<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>&lt;anto.cuni@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Antonio Cuni &lt;anto.cuni@gmail.com&gt;<br>Subject: Re: [pypy-dev] List Slicing Performance Drop<br>To: "Maciej Fijalkowski"
 &lt;fijall@gmail.com&gt;<br>Cc: "Mohyiddeen Othman" &lt;mohyiddeen@yahoo.com&gt;, 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>&gt; 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>&gt; On Mon, May 23, 2011 at 10:11 AM, Antonio Cuni &lt;<a ymailto="mailto:anto.cuni@gmail.com" href="/mc/compose?to=anto.cuni@gmail.com">anto.cuni@gmail.com</a>&gt; wrote:<br>&gt;&gt; On 20/05/11 23:23, Mohyiddeen Othman wrote:<br>&gt;&gt;&gt; Hi,<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I've been recently doing Project Euler puzzles using Python, and have recently<br>&gt;&gt;&gt; started to use PyPy to increase performance.
 However I've come across<br>&gt;&gt;&gt; something (no pun intended) puzzling. I made this script for Euler #50.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; <a href="http://pastebin.com/VZ12Nsci" target="_blank">http://pastebin.com/VZ12Nsci</a><br>&gt;&gt;&gt;<br>&gt;&gt;&gt; It calculates all the primes under 1M first, then looks through them for a<br>&gt;&gt;&gt; solution. The first part (finding primes) is blazing fast under PyPy (as<br>&gt;&gt;&gt; expected). But in the second part PyPy lags behind. CPython managed it in<br>&gt;&gt;&gt; 183s, while PyPy did it in 498s. I'm assuming it has something to do with the<br>&gt;&gt;&gt; list slicing?<br>&gt;&gt;<br>&gt;&gt; I cannot reproduce, for me pypy is faster on both pieces of code:<br>&gt;&gt;<br>&gt;&gt; viper ~ $ pypy-c /tmp/euler.py<br>&gt;&gt; ('All primes below', 1000000, 'found')<br>&gt;&gt; 0.43<br>&gt;&gt; Max sequence is:<br>&gt;&gt; ....<br>&gt;&gt; ....<br>&gt;&gt; ('It contains', 543,
 'elements')<br>&gt;&gt; ('The sum is', 997651)<br>&gt;&gt; 72.61<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; viper ~ $ python /tmp/euler.py<br>&gt;&gt; ('All primes below', 1000000, 'found')<br>&gt;&gt; 4.58<br>&gt;&gt; Max sequence is:<br>&gt;&gt; ....<br>&gt;&gt; ....<br>&gt;&gt; ('It contains', 543, 'elements')<br>&gt;&gt; ('The sum is', 997651)<br>&gt;&gt; 128.81<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Could you tell us more about your environment, like which OS, cpu, 32/64 bit<br>&gt;&gt; and the exact version of pypy/cpython you used to do the benchmark please?<br>&gt;&gt;<br>&gt;&gt; ciao,<br>&gt;&gt; Anto<br>&gt;&gt; _______________________________________________<br>&gt;&gt; pypy-dev mailing list<br>&gt;&gt; <a ymailto="mailto:pypy-dev@python.org" href="/mc/compose?to=pypy-dev@python.org">pypy-dev@python.org</a><br>&gt;&gt; <a href="http://mail.python.org/mailman/listinfo/pypy-dev"
 target="_blank">http://mail.python.org/mailman/listinfo/pypy-dev</a><br>&gt;&gt;<br><br></div></blockquote></td></tr></table>