[prev in list] [next in list] [prev in thread] [next in thread]
List: pypy-dev
Subject: Re: [pypy-dev] PyPy is much slower than CPython example / question
From: Alex Gaynor <alex.gaynor () gmail ! com>
Date: 2011-07-08 1:15:08
Message-ID: CAFRnB2UBQGe7i+XJDHcfPvrZE5dRdoJ1n5x3ceVODJWFgM0Asg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
No, you would need to implement list.__setitem__ in Python, which we could
do, does the JIT see such code?
Alex
On Thu, Jul 7, 2011 at 6:05 PM, <exarkun@twistedmatrix.com> wrote:
> On 12:38 am, alex.gaynor@gmail.com wrote:
>
>> repeat itself is not slow, it's just that when it's used it iterates over
>> it, in RPython (meaning it's not jit'd) which results in a dictionary
>> lookup
>> for the next() method at every iteration, which is slowish, list hits a
>> special case so it doesn' thave that overhead.
>>
>
> Is it time to reimplement repeat in Python then?
>
> Jean-Paul
>
--
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
[Attachment #5 (text/html)]
No, you would need to implement list.__setitem__ in Python, which we could do, does \
the JIT see such code?<div><br></div><div>Alex<br><br><div class="gmail_quote">On \
Thu, Jul 7, 2011 at 6:05 PM, <span dir="ltr"><<a \
href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>></span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"><div class="im">On 12:38 am, <a \
href="mailto:alex.gaynor@gmail.com" target="_blank">alex.gaynor@gmail.com</a> \
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> repeat itself is not slow, it's just that when it's \
used it iterates over<br> it, in RPython (meaning it's not jit'd) which \
results in a dictionary lookup<br> for the next() method at every iteration, which is \
slowish, list hits a<br> special case so it doesn' thave that overhead.<br>
</blockquote>
<br></div>
Is it time to reimplement repeat in Python then?<br>
<br>
Jean-Paul<br>
</blockquote></div><br><br clear="all"><br>-- <br>"I disapprove of what you say, \
but I will defend to the death your right to say it." -- Evelyn Beatrice Hall \
(summarizing Voltaire)<br>"The people's good is the highest law." -- \
Cicero<br> <br>
</div>
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic