Message391005
| Author |
vstinner |
| Recipients |
corona10, miss-islington, pablogsal, petr.viktorin, phsilva, rhettinger, serhiy.storchaka, shihai1991, vstinner |
| Date |
2021年04月13日.20:53:45 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1618347226.03.0.907724980369.issue40137@roundup.psfhosted.org> |
| In-reply-to |
| Content |
I wrote PR 25393 to micro-optimize _PyType_GetModuleByDef(). It reduces the overhead from +5.7 ns to +3.4 ns (-2.3 ns).
Well, I didn't check in depth if _PyType_GetModuleByDef() is the only change in functools.lru_cache() from Python 3.9 to master.
Compare master to Python 3.9:
Mean +- std dev: [py39] 37.5 ns +- 1.0 ns -> [master] 43.2 ns +- 0.7 ns: 1.15x slower
Compare PR 25393 to Python 3.9:
Mean +- std dev: [py39] 37.5 ns +- 1.0 ns -> [inline] 40.9 ns +- 1.0 ns: 1.09x slower
Compare PR 25393 to master:
Mean +- std dev: [master] 43.2 ns +- 0.7 ns -> [inline] 40.9 ns +- 1.0 ns: 1.05x faster |
|