by sgarland · 2y ago · 0 comments
For example, 3.12 changed the byte code list comprehensions use, citing faster performance. In my tests, this is only true with small lists, and as soon as you get to a large number of items (~10K), it falls off a cliff. While large lists are probably not the norm, to have that completely ignored is maddening.
The 3.13 REPL is nice, I’ll give them that.
Now when you are a professional dev, you see them less and less, because you make less mistakes, but also because you heavily use tooling to prevent errors or diagnose them.
But if you observe beginners with modern versions of Python, it's quite magical really. The autonomy and confidence they get from those are huge.
The energy that Pablo Galindo Salgado injected into the culture of good error message has been a boon to the language.
Running on Python 3.12.7 (main, Oct 2 2024, 15:45:55) [Clang 18.1.8 ] 16.69ns on N=100 18.84ns on N=1_000 15.88ns on N=10_000 14.26ns on N=100_000 14.70ns on N=1_000_000
Running on Python 3.13.0 (main, Oct 16 2024, 08:05:40) [Clang 18.1.8 ] 9.54ns on N=100 17.88ns on N=1_000 15.81ns on N=10_000 14.14ns on N=100_000 14.46ns on N=1_000_000
[1] https://gist.github.com/thomasaarholt/2e4d42cbf3f0de60c811bb...
https://gist.github.com/thomasaarholt/2e4d42cbf3f0de60c811bb...
Running on Python 3.12.7 (main, Oct 2 2024, 15:45:55) [Clang 18.1.8 ]
11.32ns on N=100
9.42ns on N=1000
7.32ns on N=10000
5.23ns on N=100000
5.87ns on N=1000000
Running on Python 3.13.0 (main, Oct 16 2024, 08:05:40) [Clang 18.1.8 ]
7.30ns on N=100
5.91ns on N=1000
5.09ns on N=10000
4.31ns on N=100000
5.89ns on N=1000000