2013/2/13 Lennart Regebro <[email protected]>
> On Wed, Feb 13, 2013 at 3:27 PM, Amaury Forgeot d'Arc
> <[email protected]> wrote:
> > Yes, it's jitted.
>
> Admittedly, I have no idea in which cases the JIT kicks in, and what I
> should do to make that happen to make sure I have the best possible
> real-life test cases.
>
PyPy JIT kicks in only after 1000 iterations.
I usually use timeit.
It's funny to see how the "1000 loops" line is 5 times faster than the "100
loops":
$ ./pypy-c -m timeit -v -s "a,b,c,d='1234'" "'{}{}{}{}'.format(a,b,c,d)"
10 loops -> 2.19e-05 secs
100 loops -> 0.000122 secs
1000 loops -> 0.00601 secs
10000 loops -> 0.000363 secs
100000 loops -> 0.00528 secs
1000000 loops -> 0.0533 secs
10000000 loops -> 0.528 secs
raw times: 0.521 0.52 0.51
10000000 loops, best of 3: 0.051 usec per loop
--
Amaury Forgeot d'Arc
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com