4 ms·
Pharo 3's results (JIT enabled VM) [(1 to: 100000000) sum] timeToRun 0:00:00:07.335 http://pharo.org http://pharo.org Version 4 with new VM due in 2015. Wil
by philippeback 12y ago
Pharo 3's results (JIT enabled VM)
[(1 to: 100000000) sum] timeToRun 0:00:00:07.335
http://pharo.org 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.
- masklinn 12y ago> 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
- philippeback 12y agoWe can do it this was if needed. http://clementbera.wordpress.com/2013/06/19/optimizing-pharo-to-c-speed-with-nativeboost-ffi/ http://clementbera.wordpress.com/2013/06/19/optimizing-pharo...
- masklinn 12y agoHaving 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/ https://cffi.readthedocs.org/en/release-0.8/