Doc magic timeit #222

Closed
wants to merge 1 commit into from

2 participants

@varshinireddy

Added examples for %timeit as part of scipy India report

@varshinireddy varshinireddy Wrote examples for %timeit.
Work done as a group by:
- B.Varshini
- P.Vaishnavi
- K.Santosh
- N.Venkatesh
a90f2ea
@takluyver takluyver commented on the diff Feb 13, 2011
IPython/core/magic.py
@@ -1719,7 +1719,18 @@ Currently the magic system has the following functions:\n"""
In [6]: %timeit -n1 time.sleep(2)
1 loops, best of 3: 2 s per loop
-
+
+ In [7]: %timeit -n 15 x='hjsjkdhhsk'
+ 15 loops, best of 3: 127 ns per loop
+
+ In [8]: %timeit -n 10 -t x='hjsjkdhhsk'
+ 10 loops, best of 3: 191 ns per loop
@takluyver
IPython member

Let's stick to 1 or 2 good examples, not half a dozen all doing pretty much the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@takluyver
IPython member

In fact, looking at it, we've probably got enough examples as it stands. Thanks for the help, and you're welcome to keep contributing.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment