Skip to content

damontallen/Timeit_magic_vs_module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Timeit_magic_vs_module

This is a comparison between the IPython %timeit magic command and the Python timeit module with an HTML table library for the results.

The motivation of this project was the slight frustration that I couldn't get a numerical value from IPython's %timeit magic. After looking into the timeit module in Python and seeing this notebook's use of decorators I was determined to make a library that would make an HTML table of the results.

FunctionBest time of 3Loops
add519.643 us1000
mult520.225 us1000
dist670.213 us1000

As long as the functions are taking the same data building a table is as simple as passing a list of the function names and the data to the "testing" function of the TimeIt_func library.

The example notebook is displayed here.

About

This is a comparison between the IPython %timeit magic command and the Python timeit module with an HTML table library for the results.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages