I wrote about where the latest speed improvements in Python 3.11 come from: https://log.beshr.com/python-311-speedup-part-1/ Part 1 of 2.