š Python 3.11.2: The Trick For 11% Speedup
Among 60 fixes, developers maintain a 2 year old, brilliant performance improvement people donāt know about
Python 3.11.2 was released on February 7 and announced on February 9, 2023. It is a minor release, so why bother? I have spent some time to find some interesting things in this release, and one is a diamond! Letās dig in!
šŖ² Proper Error Line
When a continue or break statement were placed outside the loop, Python reported the error line as -1. For example like here:
The bug was fixed by Dong-hee Na, and if you look at the original proposal it was done with four lines of code that preserve the original line number to display it properly.
Four lines is little, but the time to find the right placesā¦
Read To The End For a Bonus!
š A Fix Around A Brilliant And Unknown Up To 11% Performance Improvement
That one is pretty interesting. Two years ago Python developers introduced an improvement that increased the performance by up to 11%.