3 ms·
Any elaboration on where the 10% performance hit comes from? I read over the "What's New" and Guido's announcement, but I didn't find any mention of it.
by mahipal 18y ago
Any elaboration on where the 10% performance hit comes from?
I read over the "What's New" and Guido's announcement, but I didn't find any mention of it.
- kaens 18y agoMost likely the biggest cause is the removal of special-casing for small integers. http://docs.python.org/dev/3.0/whatsnew/3.0.html#performance http://docs.python.org/dev/3.0/whatsnew/3.0.html#performance I'm anticipating a more thorough discussion of this on python-list or python-dev in the near future.
- petercooper 18y agoI expect it's just a case of removing optimizations in order to get everything stable, then they can start work on new optimizations. I'm not a Python dev though, so elaboration would be cool ;-)
- kaens 18y agoIn this particular case, I think it's because all ints are now longs. Or rather, there's one int type and it behaves like a long. I'm not a python dev either, but that's what I've gathered by lurking the python-dev and python-3000 mailing lists.
- cpr 18y agoJust to clarify for non-Pythonistas, a "long" is an unlimited precision integer.
- petercooper 18y agoUnder "Performance" at http://docs.python.org/dev/3.0/whatsnew/3.0.html http://docs.python.org/dev/3.0/whatsnew/3.0.html : The net result of the 3.0 generalizations is that Python 3.0 runs the pystone benchmark around 10% slower than Python 2.5. Most likely the biggest cause is the removal of special-casing for small integers. There’s room for improvement, but it will happen after 3.0 is released!