Message390758
| Author |
pablogsal |
| Recipients |
corona10, miss-islington, pablogsal, petr.viktorin, phsilva, rhettinger, serhiy.storchaka, shihai1991, vstinner |
| Date |
2021年04月11日.01:20:14 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1618104014.27.0.574774269911.issue40137@roundup.psfhosted.org> |
| In-reply-to |
| Content |
Here are some benchmarks of using lru_cache in 3.9 and 3.10 (PGO/LTO/CPU isol):
❯ ./python -m pyperf timeit "from functools import lru_cache; f = lru_cache(lambda: 42)" "f()" --compare-to ../3.9/python
/home/pablogsal/github/3.9/python: ..................... 2.60 us +- 0.05 us
/home/pablogsal/github/cpython/python: ..................... 2.74 us +- 0.06 us
Mean +- std dev: [/home/pablogsal/github/3.9/python] 2.60 us +- 0.05 us -> [/home/pablogsal/github/cpython/python] 2.74 us +- 0.06 us: 1.06x slower
Given that lru_cache is normally used to seek speed, this is a bit unfortunate :( |
|