Skip to content

Conversation

@brandtbucher
Copy link
Member

@brandtbucher brandtbucher commented Nov 15, 2021

In addition to cleaning things up considerably, this also appears to have a tiny positive perf impact:

Details
Slower (12):- logging_format: 6.54 us +- 0.10 us -> 6.75 us +- 0.09 us: 1.03x slower- logging_simple: 5.98 us +- 0.08 us -> 6.17 us +- 0.10 us: 1.03x slower- logging_silent: 113 ns +- 3 ns -> 117 ns +- 3 ns: 1.03x slower
- pathlib: 18.7 ms +- 0.2 ms -> 19.1 ms +- 0.3 ms: 1.02x slower
- pickle_list: 4.35 us +- 0.05 us -> 4.45 us +- 0.05 us: 1.02x slower
- unpack_sequence: 46.6 ns +- 1.5 ns -> 47.3 ns +- 2.0 ns: 1.01x slower
- scimark_monte_carlo: 77.9 ms +- 0.8 ms -> 79.0 ms +- 1.5 ms: 1.01x slower
- float: 81.7 ms +- 0.8 ms -> 82.7 ms +- 1.0 ms: 1.01x slower
- scimark_fft: 335 ms +- 4 ms -> 338 ms +- 2 ms: 1.01x slower
- pickle_dict: 27.7 us +- 0.1 us -> 28.0 us +- 0.1 us: 1.01x slower
- sympy_integrate: 22.0 ms +- 0.1 ms -> 22.1 ms +- 0.1 ms: 1.01x slower
- deltablue: 4.74 ms +- 0.05 ms -> 4.76 ms +- 0.04 ms: 1.00x slower

Faster (24):
- pidigits: 195 ms +- 0 ms -> 188 ms +- 0 ms: 1.04x faster
- regex_dna: 218 ms +- 1 ms -> 210 ms +- 1 ms: 1.04x faster
- crypto_pyaes: 88.7 ms +- 1.1 ms -> 85.9 ms +- 0.6 ms: 1.03x faster
- pyflate: 523 ms +- 5 ms -> 512 ms +- 3 ms: 1.02x faster
- regex_v8: 23.4 ms +- 0.4 ms -> 23.0 ms +- 0.1 ms: 1.02x faster
- unpickle: 14.4 us +- 0.5 us -> 14.1 us +- 0.6 us: 1.02x faster
- nbody: 108 ms +- 1 ms -> 106 ms +- 2 ms: 1.02x faster
- fannkuch: 411 ms +- 4 ms -> 405 ms +- 3 ms: 1.02x faster
- chameleon: 7.54 ms +- 0.07 ms -> 7.43 ms +- 0.07 ms: 1.01x faster
- regex_effbot: 3.23 ms +- 0.07 ms -> 3.19 ms +- 0.11 ms: 1.01x faster
- python_startup_no_site: 5.63 ms +- 0.00 ms -> 5.58 ms +- 0.00 ms: 1.01x faster
- python_startup: 7.65 ms +- 0.01 ms -> 7.58 ms +- 0.01 ms: 1.01x faster
- sqlite_synth: 2.77 us +- 0.06 us -> 2.74 us +- 0.05 us: 1.01x faster
- pickle_pure_python: 365 us +- 3 us -> 361 us +- 2 us: 1.01x faster
- scimark_sor: 152 ms +- 3 ms -> 151 ms +- 3 ms: 1.01x faster
- go: 169 ms +- 2 ms -> 168 ms +- 3 ms: 1.01x faster
- regex_compile: 143 ms +- 1 ms -> 142 ms +- 1 ms: 1.01x faster
- unpickle_list: 5.18 us +- 0.04 us -> 5.14 us +- 0.13 us: 1.01x faster
- pickle: 9.94 us +- 0.10 us -> 9.87 us +- 0.06 us: 1.01x faster
- chaos: 77.9 ms +- 0.8 ms -> 77.5 ms +- 0.7 ms: 1.01x faster
- xml_etree_iterparse: 106 ms +- 1 ms -> 105 ms +- 1 ms: 1.00x faster
- dulwich_log: 66.5 ms +- 0.4 ms -> 66.3 ms +- 0.4 ms: 1.00x faster
- mako: 12.0 ms +- 0.1 ms -> 12.0 ms +- 0.1 ms: 1.00x faster
- 2to3: 270 ms +- 1 ms -> 269 ms +- 1 ms: 1.00x faster

Benchmark hidden because not significant (22): django_template, hexiom, json_dumps, json_loads, meteor_contest, nqueens, raytrace, richards, scimark_lu, scimark_sparse_mat_mult, spectral_norm, sqlalchemy_declarative, sqlalchemy_imperative, sympy_expand, sympy_sum, sympy_str, telco, tornado_http, unpickle_pure_python, xml_etree_parse, xml_etree_generate, xml_etree_process

Geometric mean: 1.00x faster

https://bugs.python.org/issue45636

@markshannon
Copy link
Member

There is one warning that needs to be taken care of, otherwise LGTM.

@brandtbucher brandtbucher merged commit 6a84d61 into python:main Nov 16, 2021
@brandtbucher brandtbucher deleted the unswitch-binary-op branch November 16, 2021 14:49
remykarem pushed a commit to remykarem/cpython that referenced this pull request Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants