Earlier quoted context omitted.
Back when Python was started there was really C or C++ for optimized programs and scripting languages like Python and Perl. But since Python had the ability for C Extensions it allowed it to bypass those problems. Since Python was easy to learn both web developers and scientists to learn. Then financial organizations started to get interested and that’s really how Python cemented itself. What exactly do you do with P…
I worked on Python almost exclusively for maybe five years. Then I tried go. Each time I wrote a go program, I am giddy with excitement at how fast my first attempt is, scaling so smoothly with the number of cores. I also wrote a lot of fairly performant C in the 90s, so I know what computers can do in a second. I still use Python for cases when dev time is more important than execution time (which is rarer now that…
Python 3.11 vs 3.10 performance
231–240 of 460 posts
Re: Python 3.11 vs 3.10 performance
#232https://mail.python.org/archives/list/python-dev@python.org/...
Folks not desperate for the improvements might want before jumping in.
Re: Python 3.11 vs 3.10 performance
#233Earlier 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.
There are a few much better options like mergesort or quicksort, but they have their tricks.
But to sort real data really fast, you should use something like timsort, that detects if the data is just the union of two (or a few) sorted parts, so it's faster in many cases where the usual sorting methods don't detect the sorted initial parts. https://en.wikipedia.org/wiki/Timsort
Are you sorting integers? Strings? Ascii-only strings? Perhaps the code should detect some of them and run an specialized version.
Re: Python 3.11 vs 3.10 performance
#234Re: Python 3.11 vs 3.10 performance
#235Earlier quoted context omitted.
I believe that quote about debugging being twice as hard as coding is by Brian Kernighan. https://en.m.wikiquote.org/wiki/Brian_Kernighan
Maybe, I grabbed the first matching quote I found. I can't attribute it on my own.
Re: Python 3.11 vs 3.10 performance
#236Earlier quoted context omitted.
Answer is very simple. Amount of people who got paid to make python fast was rounded to 0.
Not really. There were a couple engineers working at Google on a project called unladen swallow which was extremely promising but it eventually got canceled. The developer who worked at Microsoft to make iron python I think that was his full-time project as well and it was definitely faster than cpython at the time
Re: Python 3.11 vs 3.10 performance
#237There 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.…
The GIL removal by that guy reverted some of the improvement done by other optimisations, so the overall improvement was much smaller. And most people do care for single-threaded speed, because the vast majority of Python software is written as single-threaded.
This is a self-fulfilling prophecy, as the GIL makes Python's (and Ruby's) concurrency story pretty rough compared to nearly all other widely used languages: C, C++, Java, Go, Rust, and even Javascript (as of late).
Re: Python 3.11 vs 3.10 performance
#238Somewhat related, had anyone used Nim? These days I've been using it for its Python like syntax year C like speed, especially if I just need to script something quickly.
Re: Python 3.11 vs 3.10 performance
#239Earlier quoted context omitted.
There are a lot of dynamically typed languages that are significantly faster than python. Late binding issues can be effectively worked around.
Do you have an example of a dynamically typed language where, say, addition of two lists of doubles would be significantly faster than in Python?