Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

Anyone have any insight on the comment about Python 3 being 10% slower?


It's because they left out a lot of the old optimization hacks when they reworked the interpreter. They'll either be reinserted or better solutions will be found now that the language is stable.


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! </quote> http://docs.python.org/3.0/whatsnew/3.0.html


It's a red herring. Py3k is deliberately not a production runtime; it's the "developers and students" release Jens said GvR+co should have released instead of Py3k. Crudding the runtime up with performance hacks would cost more than they'd be worth.

The Ruby comparison Jens makes is exceedingly disingenuous; Ruby 1.9 is a runtime upgrade, not a major language update. Improving performance is mostly the point of it. And even then, there are areas of Ruby that remain controversial, like the threading model.


From a comment in the article:

> 3.0 is 10% slower because of the change from ints to longs. If you read it carefully, they mention that there is space for improvement, but they want to have it out so people can start to use and see the differences. Release early, release often (and it took 3 years to get there, so better do this once and for all.)


regular strings now use more than 8 bits per char.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: