Re:Optimizations which made Python 3.6 faster than Python 3....
by jayflux on Monday June 05, 2017 @01:30PM
(#14489452)
> 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!
Re:Optimizations which made Python 3.6 faster than Python 3....
by rplnt on Monday June 05, 2017 @01:35PM
(#14489486)
Here's the full benchmark suite from speed.python.org showing what is faster and what is slower in 3.6 as compared to 2.7:
https://speed.python.org/comparison/?exe=12%2BL%2B3.6%2C12%2...
It would be very hard for someone to say "python 3 is considerably slower". Startup is significantly slower, yes, but that's about it.
Re:Optimizations which made Python 3.6 faster than Python 3....
by dom0 on Monday June 05, 2017 @01:58PM
(#14489707)
It's not like it should surprise anyone. The import machinery in Python 2 was mostly written in C, while it's pure Python in Python 3. And if you've seen what that stuff does it's no surprise that even fairly small applications can take .1-.2 s to reach main.
A tool gathering imports in one file if it is safe to do so would be really quite neat for deploying interactive Python applications (command line / GUIs).
On the more extreme end you'd have a C application linking not too many libraries (symbols are lazily loaded, libraries are not) that reaches main after 0.0001-0.0002 s (i.e. one to two hundred µs).
On the other extreme would be Java apps using heavy runtime-code-generating frameworks like Spring, where even a trivial app can take up to ten seconds to spring to life.
Re:Optimizations which made Python 3.6 faster than Python 3....
by estebank on Monday June 05, 2017 @01:38PM
(#14489510)
Quoting a release note from 8 years ago to represent the current state of the project is disingenuous at best.
You have wrong information.