Author brandtbucher
Recipients Kshitiz17, brandtbucher, rhettinger, steven.daprano, xtreak
Date 2021-06-02.16:51:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622652707.77.0.918870219889.issue44276@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-06-02 16:51:47brandtbuchersetrecipients: + brandtbucher, rhettinger, steven.daprano, xtreak, Kshitiz17
2021-06-02 16:51:47brandtbuchersetmessageid: <1622652707.77.0.918870219889.issue44276@roundup.psfhosted.org>
2021-06-02 16:51:47brandtbucherlinkissue44276 messages
2021-06-02 16:51:47brandtbuchercreate