@
wuwukai007 https://docs.python.org/3.8/whatsnew/3.8.html#optimizations 看了下优化部分, 还是挺明显的.
Improved performance of operator.itemgetter() by *33%*. Optimized argument handling and added a fast path for the common case of a single non-negative integer index into a tuple (which is the typical use case in the standard library).
Sped-up field lookups in `collections.namedtuple()`. They are now more than two times faster, making them the fastest form of instance variable lookup in Python.
The list constructor does not overallocate the internal item buffer if the input iterable has a known length (the input implements __len__). This makes the created list *12%* smaller on average.
Reduced an overhead of converting arguments passed to many builtin functions and methods. This sped up calling some simple builtin functions and methods up to *20–50%*.
LOAD_GLOBAL instruction now uses new “per opcode cache” mechanism. It is about *40%* faster now.