4 ms·
> One thing to keep in mind is that python 3 is still considerably slower than python 2. You have wrong information.
by mundanevoice 9y ago
> One thing to keep in mind is that python 3 is still considerably slower than python 2.
You have wrong information.
- jayflux 9y ago> 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 https://docs.python.org/release/3.0.1/whatsnew/3.0.html
- rplnt 9y agoHere'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%2BL%2B2.7&ben=616%2C617%2C618%2C619%2C620%2C621%2C622%2C623%2C624%2C625%2C626%2C627%2C628%2C629%2C630%2C631%2C632%2C680%2C633%2C634%2C635%2C636%2C637%2C638%2C639%2C640%2C641%2C642%2C643%2C644%2C645%2C646%2C647%2C648%2C681%2C649%2C650%2C651%2C652%2C653%2C654%2C655%2C656%2C657%2C658%2C659%2C660%2C661%2C682%2C662%2C663%2C664%2C665%2C666%2C667%2C669%2C668%2C670%2C671%2C672%2C673%2C674%2C675%2C678%2C677%2C676%2C679&env=1&hor=true&bas=12%2BL%2B2.7&chart=normal+bars 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.
- dom0 9y agoIt'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.
- estebank 9y agoQuoting a release note from 8 years ago to represent the current state of the project is disingenuous at best.
- rspeer 9y agoI 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.
- coldtea 9y agoHow is 3.0 era information relevant for 3.5, much less 3.6?