[pypy-dev] JIT Spikes During Timings

Kevin Ednalino kcednalino at gmail.com
Sat Jan 10 07:57:47 CET 2015


Hi. I'm using PyPy3 in the context of a game engine and I'm getting these
spikes when timing it, such as:

Engine: 3.0 ms
Engine: 3.9 ms
Engine: 3.0 ms
Engine: 7.9 ms
Engine: 25.1 ms
Engine: 2.2 ms
Engine: 2.2 ms
Engine: 3.1 ms
Engine: 3.0 ms
Engine: 4.2 ms

When I run the engine on CPython 3, the timings are more consistent:

Engine: 1.7 ms
Engine: 1.8 ms
Engine: 1.2 ms
Engine: 1.8 ms
Engine: 1.7 ms
Engine: 1.3 ms
Engine: 1.6 ms
Engine: 1.8 ms
Engine: 1.9 ms
Engine: 1.5 ms

I've gotten spikes when timing much simpler things. I don't believe my code
is doing anything exceptional to cause the spikes. My educated guess is
it's due to the GC or more likely the JIT. When I run the engine with JIT
off like so, "pypy3 --jit off main.py", the spikes disappear (albeit not as
fast with it on). I've also been playing around with the minimark settings
but no luck so far; possibly tweaking the JIT settings might help.

Any suggestions are welcomed :).

Specifications:

pypy3 --version:
Python 3.2.5 (b2091e973da69152b3f928bfaabd5d2347e6df46, Nov 18 2014,
20:15:54)
[PyPy 2.4.0 with GCC 4.9.2]

uname -a:
Linux archlinux 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014
x86_64 GNU/Linux

Sincerely,
Kevin Ednalino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20150109/e3634d16/attachment.html>


More information about the pypy-dev mailing list