[pypy-dev] List Slicing Performance Drop
Mohyiddeen Othman
mohyiddeen at yahoo.com
Fri May 20 23:23:22 CEST 2011
Hi,
I've been recently doing Project Euler puzzles using Python, and have recently started to use PyPy to increase performance. However I've come across something (no pun intended) puzzling. I made this script for Euler #50.
http://pastebin.com/VZ12Nsci
It calculates all the primes under 1M first, then looks through them for a solution. The first part (finding primes) is blazing fast under PyPy (as expected). But in the second part PyPy lags behind. CPython managed it in 183s, while PyPy did it in 498s. I'm assuming it has something to do with the list slicing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20110520/fdaacde2/attachment-0001.html>
More information about the pypy-dev
mailing list