| 1 | initial version |
Did you try %timeit as the first line in the cell? I'm not sure whether that would work.
Another option is to write a dummy program that calls your other program, like def foo(): return my_program(n) and then do timeit on foo.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.