![](https://secure.gravatar.com/avatar/bfc96d2a02d9113edb992eb96c205c5a.jpg?s=120&d=mm&r=g)
On Thu, Feb 3, 2011 at 1:43 AM, Fredrik Johansson <fredrik.johansson@gmail.com> wrote:
On Thu, Feb 3, 2011 at 12:32 AM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
If you have any benchmarks where we are slower that don't involve longs that'd be great, since for float operations we really should be able to beat up on CPython.
A simple example: mpmath.fp.fsum(mpmath.fp.sqrt(k) for k in xrange(1000000))
A brief follow up. * PyPy trunk is faster (by quite a bit). * I noticed that you happily use mixture of old and new style classes. As of now this is a really bad case for PyPy. Example:
[isinstance(i, type) for i in mpmath.fp.__class__.__mro__] [True, True, True, True, False, False, True, True, False, True, True, True, True, True, True]
when I replace it with newstyle classes it runs much faster Other things that speed up both CPython and PyPy: * Put this things into function instead of at global scope * Use list comprehension instead of generator expression. That all should make PyPy 3x faster than CPython.
PyPy 1.4 runs this about 2.4 times slower than CPython.
Fredrik _______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev