3 ms·
Or you can just do what Python 3.7 implemented (and Instagram seems to have separately implemented) -- cache attribute lookups and invalidate the cache if neces
by xapata 8y ago
Or you can just do what Python 3.7 implemented (and Instagram seems to have separately implemented) -- cache attribute lookups and invalidate the cache if necessary. [0]
The GC optimization, well, that'll probably be left up to other interpreters.
[0] "Mark Shannon said that Python 3.7 has added a feature that should provide a similar boost as the method-lookup caching used in the experiment. Shapiro said he had looked at those changes but still believed his proposed mechanism would provide more benefit. Attribute lookup still requires five lookups in CPython, while it is only one lookup in the experimental version. Shannon did not sound entirely convinced of that, however." https://lwn.net/Articles/754163/ https://lwn.net/Articles/754163/