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.
Function | Best time of 3 | Loops |
add | 519.643 us | 1000 |
mult | 520.225 us | 1000 |
dist | 670.213 us | 1000 |
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.