Hi Kevin, On 22 April 2014 21:29, Kevin Modzelewski <k...@dropbox.com> wrote: > I've also tried to extract a part of the program that seemed to run > significantly slower under PyPy, and got this microbenchmark: > https://github.com/dropbox/pyston/blob/master/microbenchmarks/polymorphism.py
This suffers from extreme warm-up times. If I run it as posted, I get 9.1s on PyPy versus 4.4s on CPython. If I increase the number of iterations from 1k to 10k, I get 18.9s on PyPy versus 44s on CPython. The reasons for the large warm-up times are multiple: it's a highly recursive example; a core function in this recursion contains a loop that runs only twice; and the overall process is repeated 1000 times --- just before the JIT triggers compilation from the outermost level. It's an example where we should ideally detect that the loop typically runs twice, and unroll it. If we change the source code to manually unroll it, the four timings above become respectively 3.9s, 3.9s, 6.1s, 39s. A bientôt, Armin. _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev