Message394927
Hm, that benchmark seems really noisy. Looking at your code, it appears that you aren't actually iterating over the results.
I've attached a version of your benchmark rewritten to use pyperf. Here are the results on a system with a fresh PGO/LTO build of CPython main, run with CPU isolation:
(py) bucher@is-bucher-p1:~/src/patmaperformance$ sudo $(which pyperf) system tune > /dev/null
(py) bucher@is-bucher-p1:~/src/patmaperformance$ sudo $(which python) if_match.py --rigorous
.........................................
if: Mean +- std dev: 2.16 ms +- 0.13 ms
.........................................
match: Mean +- std dev: 2.13 ms +- 0.07 ms
It appears that there is no significant difference between the two (which is what I expect, given the current implementation). With that said, our work in issue 44283 will likely have a significant impact for cases like this. |
|
Date |
User |
Action |
Args |
2021-06-02 16:51:47 | brandtbucher | set | recipients:
+ brandtbucher, rhettinger, steven.daprano, xtreak, Kshitiz17 |
2021-06-02 16:51:47 | brandtbucher | set | messageid: <1622652707.77.0.918870219889.issue44276@roundup.psfhosted.org> |
2021-06-02 16:51:47 | brandtbucher | link | issue44276 messages |
2021-06-02 16:51:47 | brandtbucher | create | |
|