On 05/14/2011 11:41 AM, Armin Rigo wrote:
Hi David,
On Fri, May 13, 2011 at 10:10 PM, David Edelsohn<dje....@gmail.com> wrote:
The problem was due to the user program's use of a class
variable as a counter, which caused "unfortunate" behavior in the
IronPython implementation -- mutating the variable invalidated the
cache.
PyPy has indeed mostly the same behavior, but it is still faster than
CPython on the example you give. It is because you don't do anything
with the Nodes. If we modify the example
(http://paste.pocoo.org/show/388541/) to read all '_children'
attributes after all Nodes have been created, then PyPy is very slow.
In this example it is 4x slower than CPython when called with 2000000.
Thanks for pushing us in trying to find a solution for this problem :-)
Did you try this with PyPy 1.5 or a recent nightly? I thought that the
new type __dict__ implementation should have fixed the problem?
Carl Friedrich
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev