Re:Why Python Is Slow: Looking Under the Hood
by masklinn on Tuesday November 18, 2014 @03:17PM
(#8626062)
> pypy -mtimeit 'sum(xrange(1, 100000001))'
10 loops, best of 3: 153 msec per loop
however the context of TFA is scientific computing, hence pypy being ignored/dismissed
Re:Why Python Is Slow: Looking Under the Hood
by philippeback on Tuesday November 18, 2014 @04:06PM
(#8626354)
We can do it this was if needed.
http://clementbera.wordpress.com/2013/06/19/optimizing-pharo...
Re:Why Python Is Slow: Looking Under the Hood
by masklinn on Tuesday November 18, 2014 @04:51PM
(#8626587)
Having an FFI is not relevant, Pypy has an excellent FFI already[0].
You can't interface with the existing SciPy ecosystem which expects the CPython API, which is the reason why pypy doesn't matter in scientific computing.
[0] inspired by LuaJIT and usable from both CPython and PyPy: https://cffi.readthedocs.org/en/release-0.8/
[(1 to: 100000000) sum] timeToRun 0:00:00:07.335
http://pharo.org
Version 4 with new VM due in 2015.
Will perform much much better as with the range used, we need to use LargeIntegers as the 32 bit VM must promote to LargeInteger objects. With the 64bit VM, all fits in.