<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I thought I did reply? Must've been mistaken. My bad. <br><br>Thanks for the reply. I'm running <span style="border-bottom: 2px dotted rgb(54, 99, 136); cursor: pointer; background: none repeat scroll 0% 0% transparent;" class="yshortcuts" id="lw_1306856039_3">Windows XP</span> (32-bit) on an <span style="cursor: pointer; background: none repeat scroll 0% 0% transparent;" class="yshortcuts" id="lw_1306856039_4">Intel</span> Core2Duo E6550 2.33 GHz. I'm using CPython 2.7 and PyPy 1.5<br><br>I'm begining to think I'm doing something wrong.<br><br>--- On <b>Tue, 5/31/11, Antonio Cuni <i><anto.cuni@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Antonio Cuni <anto.cuni@gmail.com><br>Subject: Re: [pypy-dev] List Slicing Performance Drop<br>To: "Maciej Fijalkowski"
<fijall@gmail.com><br>Cc: "Mohyiddeen Othman" <mohyiddeen@yahoo.com>, pypy-dev@python.org<br>Date: Tuesday, May 31, 2011, 1:07 AM<br><br><div class="plainMail">On 31/05/11 09:13, Maciej Fijalkowski wrote:<br>> Anto: what version of python did you use? There can be 2.6 vs 2.7 issue<br><br>please don't do top posting, it's very confusing on mailing lists :-(<br><br>Anyway, the results below are with python2.7. python2.6 is slightly slower,<br>but not much. I confirm that pypy is faster on my machine.<br><br>ciao,<br>Anto<br><br>> On Mon, May 23, 2011 at 10:11 AM, Antonio Cuni <<a ymailto="mailto:anto.cuni@gmail.com" href="/mc/compose?to=anto.cuni@gmail.com">anto.cuni@gmail.com</a>> wrote:<br>>> On 20/05/11 23:23, Mohyiddeen Othman wrote:<br>>>> Hi,<br>>>><br>>>> I've been recently doing Project Euler puzzles using Python, and have recently<br>>>> started to use PyPy to increase performance.
However I've come across<br>>>> something (no pun intended) puzzling. I made this script for Euler #50.<br>>>><br>>>> <a href="http://pastebin.com/VZ12Nsci" target="_blank">http://pastebin.com/VZ12Nsci</a><br>>>><br>>>> It calculates all the primes under 1M first, then looks through them for a<br>>>> solution. The first part (finding primes) is blazing fast under PyPy (as<br>>>> expected). But in the second part PyPy lags behind. CPython managed it in<br>>>> 183s, while PyPy did it in 498s. I'm assuming it has something to do with the<br>>>> list slicing?<br>>><br>>> I cannot reproduce, for me pypy is faster on both pieces of code:<br>>><br>>> viper ~ $ pypy-c /tmp/euler.py<br>>> ('All primes below', 1000000, 'found')<br>>> 0.43<br>>> Max sequence is:<br>>> ....<br>>> ....<br>>> ('It contains', 543,
'elements')<br>>> ('The sum is', 997651)<br>>> 72.61<br>>><br>>><br>>> viper ~ $ python /tmp/euler.py<br>>> ('All primes below', 1000000, 'found')<br>>> 4.58<br>>> Max sequence is:<br>>> ....<br>>> ....<br>>> ('It contains', 543, 'elements')<br>>> ('The sum is', 997651)<br>>> 128.81<br>>><br>>><br>>> Could you tell us more about your environment, like which OS, cpu, 32/64 bit<br>>> and the exact version of pypy/cpython you used to do the benchmark please?<br>>><br>>> ciao,<br>>> Anto<br>>> _______________________________________________<br>>> pypy-dev mailing list<br>>> <a ymailto="mailto:pypy-dev@python.org" href="/mc/compose?to=pypy-dev@python.org">pypy-dev@python.org</a><br>>> <a href="http://mail.python.org/mailman/listinfo/pypy-dev"
target="_blank">http://mail.python.org/mailman/listinfo/pypy-dev</a><br>>><br><br></div></blockquote></td></tr></table>