Hacker News new | past | comments | ask | show | jobs | submit login

> One thing to keep in mind is that python 3 is still considerably slower than python 2.

You have wrong information.




> 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!

https://docs.python.org/release/3.0.1/whatsnew/3.0.html


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.


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.


Quoting a release note from 8 years ago to represent the current state of the project is disingenuous at best.


I don't think you'll see anyone arguing that 3.0.1 was a good version of Python, but we are talking about 3.6 here.


How is 3.0 era information relevant for 3.5, much less 3.6?




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

Search: