Profiling Python functions with IPython’s timeit

If you aren’t careful (and even sometime when you are) realtime games written in Python sometimes hit speed problems and require some profiling to bring them to a playable speed. Typically, I would use the Python standard library’s “profile” module to find “hot” functions which are stealing all the CPU cycles. Today I discovered another way. viagra benzeri ilac

Over at scienceoss.com theres a nice post about profiling functions using “timeit” within IPython. Essentially, in IPython, you can run: porro di cervere viagra

timeit my_slightly_sluggish_function(x, y)
timeit maybe_a_faster_function(x, y)

and get average execution time values over many replicates of each function call, like:

100000 loops, best of 3: 8.9 µs per loop
100000 loops, best of 3: 4.9 µs per loop

Interesting how programming for games and programming for scientific number crunching often have the same requirements and boil down to using similar techniques.

sildenafil side effects treatment

One Response to “Profiling Python functions with IPython’s timeit”

how long after eating do you take viagra

Leave a Reply

viagra super active generic

how can i make cialis work better

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

side effects of viagra on kidney

cialis 20mg kaufen schweiz

dove acquistare cialis originale

viagra substitute in homeopathy
viagra or cialis cost