Earlier quoted context omitted.
This is probably the wrong comparison to make: Python is two orders of magnitude slower than compiled GC languages, but it's in the same order of magnitude as most other interpreted GC languages. (It actually changes a whole lot, because there's a whole lot of code already out there written in Python. 25% faster is still 25% faster, even if the code would have been 100x faster to begin with in another language.)
I thought Python was slower than many other interpreted languages but looking at some benchmark it turns out I was wrong. It's about on par with Ruby, only Lua and JIT compiled runtimes beat it (for very understandable reasons).
Python 3.11 vs 3.10 performance
221–230 of 460 posts
Re: Python 3.11 vs 3.10 performance
#222Earlier quoted context omitted.
When you only have so many hours to go around, you concentrate on the main goals.
My point is that you can write fast code just as easily as you can write slow code. So engineers should write fast code when possible. Obviously you can spend a lot of time making things faster, but that doesn't mean you can't be fast by default.
Re: Python 3.11 vs 3.10 performance
#223Earlier quoted context omitted.
In a way it's a nice incentive not to nest too much (I have that tendency too)
Hold my beer! https://i.redd.it/8waggyjyyle51.png
That's one expression because it used to be part of a giant comprehension, but I moved it into a function for a bit more readability. I'm considering moving it back just for kicks though.
My philosophy is: if you're only barely smart enough to code it, you aren't smart enough to debug it. Therefore, you should code at your limit, to force yourself to get smarter while debugging
Re: Python 3.11 vs 3.10 performance
#224One of the biggest features I'm looking forward to is the more specific error messages. I can't tell you how much time I've wasted with cryptic errors that just point to a line that has a list comprehension or similar.
Re: Python 3.11 vs 3.10 performance
#225There was always a denial of removing the Global Interpreter Lock because it would decrease single threaded Python speed for which most people din’t care. So I remember a guy recently came up with a patch that both removed GIL and also to make it easier for the core team to accept it he added also an equivalent number of optimizations. I hope this release was is not we got the optimizations but ignored the GIL part.…
Re: Python 3.11 vs 3.10 performance
#226I wish there was something like llvm for scripting languages. Imagine if python, php, javascript, dart or ruby would not interpret the code themself, but compile to an interpretable common language, where you could just plug in the fastest interpreter there is for the job.
All approaches to "make Python fast again" tend to lock down some of the flexibility so aren't realy general purpose.
Re: Python 3.11 vs 3.10 performance
#227There was always a denial of removing the Global Interpreter Lock because it would decrease single threaded Python speed for which most people din’t care. So I remember a guy recently came up with a patch that both removed GIL and also to make it easier for the core team to accept it he added also an equivalent number of optimizations. I hope this release was is not we got the optimizations but ignored the GIL part.…
https://github.com/colesbury/nogil/
Interesting article about it here:
https://lukasz.langa.pl/5d044f91-49c1-4170-aed1-62b6763e6ad0...
Re: Python 3.11 vs 3.10 performance
#228One of the biggest features I'm looking forward to is the more specific error messages. I can't tell you how much time I've wasted with cryptic errors that just point to a line that has a list comprehension or similar.
Re: Python 3.11 vs 3.10 performance
#229There was always a denial of removing the Global Interpreter Lock because it would decrease single threaded Python speed for which most people din’t care. So I remember a guy recently came up with a patch that both removed GIL and also to make it easier for the core team to accept it he added also an equivalent number of optimizations. I hope this release was is not we got the optimizations but ignored the GIL part.…
And most people do care for single-threaded speed, because the vast majority of Python software is written as single-threaded.
Re: Python 3.11 vs 3.10 performance
#230There was always a denial of removing the Global Interpreter Lock because it would decrease single threaded Python speed for which most people din’t care. So I remember a guy recently came up with a patch that both removed GIL and also to make it easier for the core team to accept it he added also an equivalent number of optimizations. I hope this release was is not we got the optimizations but ignored the GIL part.…