Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45923: Add RESUME_QUICK #31244

Merged
merged 4 commits into from
Feb 10, 2022
Merged

Conversation

brandtbucher
Copy link
Member

@brandtbucher brandtbucher commented Feb 10, 2022

Also, clean up JUMP_ABSOLUTE/JUMP_ABSOLUTE_QUICK to reduce code duplication.

1% faster:

Slower (18):
- nqueens: 85.1 ms +- 1.6 ms -> 86.8 ms +- 0.8 ms: 1.02x slower
- pickle: 10.1 us +- 0.2 us -> 10.3 us +- 0.3 us: 1.02x slower
- regex_dna: 231 ms +- 1 ms -> 233 ms +- 1 ms: 1.01x slower
- sympy_expand: 493 ms +- 3 ms -> 498 ms +- 6 ms: 1.01x slower
- deltablue: 4.06 ms +- 0.06 ms -> 4.09 ms +- 0.07 ms: 1.01x slower
- json_loads: 27.0 us +- 0.3 us -> 27.2 us +- 0.5 us: 1.01x slower
- meteor_contest: 104 ms +- 0 ms -> 105 ms +- 1 ms: 1.01x slower
- xml_etree_generate: 78.5 ms +- 0.5 ms -> 79.0 ms +- 0.5 ms: 1.01x slower
- chameleon: 6.86 ms +- 0.05 ms -> 6.89 ms +- 0.07 ms: 1.01x slower
- tornado_http: 97.7 ms +- 1.2 ms -> 98.2 ms +- 1.3 ms: 1.01x slower
- sympy_sum: 166 ms +- 2 ms -> 167 ms +- 2 ms: 1.00x slower
- xml_etree_process: 55.9 ms +- 0.5 ms -> 56.2 ms +- 0.6 ms: 1.00x slower
- sympy_str: 295 ms +- 3 ms -> 296 ms +- 3 ms: 1.00x slower
- regex_v8: 25.2 ms +- 0.2 ms -> 25.3 ms +- 0.1 ms: 1.00x slower
- dulwich_log: 65.6 ms +- 0.3 ms -> 65.8 ms +- 0.4 ms: 1.00x slower
- sympy_integrate: 21.0 ms +- 0.1 ms -> 21.0 ms +- 0.2 ms: 1.00x slower
- python_startup_no_site: 6.00 ms +- 0.00 ms -> 6.01 ms +- 0.00 ms: 1.00x slower
- python_startup: 8.69 ms +- 0.01 ms -> 8.70 ms +- 0.01 ms: 1.00x slower

Faster (31):
- scimark_sparse_mat_mult: 5.02 ms +- 0.02 ms -> 4.80 ms +- 0.09 ms: 1.04x faster
- logging_silent: 110 ns +- 1 ns -> 106 ns +- 2 ns: 1.04x faster
- telco: 6.65 ms +- 0.25 ms -> 6.40 ms +- 0.14 ms: 1.04x faster
- scimark_fft: 342 ms +- 2 ms -> 330 ms +- 2 ms: 1.04x faster
- pickle_list: 4.53 us +- 0.07 us -> 4.38 us +- 0.06 us: 1.04x faster
- unpickle_list: 5.27 us +- 0.08 us -> 5.09 us +- 0.04 us: 1.03x faster
- richards: 50.5 ms +- 1.3 ms -> 48.9 ms +- 1.3 ms: 1.03x faster
- mako: 10.6 ms +- 0.1 ms -> 10.3 ms +- 0.1 ms: 1.03x faster
- pyflate: 460 ms +- 3 ms -> 448 ms +- 8 ms: 1.03x faster
- crypto_pyaes: 86.4 ms +- 1.2 ms -> 84.3 ms +- 0.9 ms: 1.02x faster
- unpack_sequence: 46.1 ns +- 0.5 ns -> 45.1 ns +- 0.7 ns: 1.02x faster
- nbody: 96.3 ms +- 1.3 ms -> 94.3 ms +- 2.3 ms: 1.02x faster
- unpickle: 14.2 us +- 0.1 us -> 13.9 us +- 0.2 us: 1.02x faster
- float: 77.5 ms +- 1.1 ms -> 76.2 ms +- 0.9 ms: 1.02x faster
- pickle_dict: 28.5 us +- 0.1 us -> 28.0 us +- 0.1 us: 1.02x faster
- django_template: 35.2 ms +- 0.4 ms -> 34.6 ms +- 0.3 ms: 1.02x faster
- scimark_monte_carlo: 71.7 ms +- 0.9 ms -> 70.6 ms +- 1.2 ms: 1.01x faster
- go: 144 ms +- 2 ms -> 142 ms +- 1 ms: 1.01x faster
- scimark_lu: 118 ms +- 4 ms -> 116 ms +- 2 ms: 1.01x faster
- pidigits: 194 ms +- 0 ms -> 192 ms +- 0 ms: 1.01x faster
- pycparser: 1.18 sec +- 0.02 sec -> 1.17 sec +- 0.01 sec: 1.01x faster
- scimark_sor: 125 ms +- 1 ms -> 124 ms +- 2 ms: 1.01x faster
- spectral_norm: 103 ms +- 1 ms -> 101 ms +- 3 ms: 1.01x faster
- logging_format: 6.03 us +- 0.10 us -> 5.96 us +- 0.09 us: 1.01x faster
- json_dumps: 12.3 ms +- 0.1 ms -> 12.2 ms +- 0.1 ms: 1.01x faster
- logging_simple: 5.49 us +- 0.08 us -> 5.43 us +- 0.08 us: 1.01x faster
- raytrace: 317 ms +- 6 ms -> 314 ms +- 6 ms: 1.01x faster
- chaos: 73.5 ms +- 1.4 ms -> 73.0 ms +- 0.6 ms: 1.01x faster
- xml_etree_iterparse: 105 ms +- 1 ms -> 105 ms +- 1 ms: 1.01x faster
- hexiom: 6.61 ms +- 0.04 ms -> 6.58 ms +- 0.04 ms: 1.00x faster
- unpickle_pure_python: 247 us +- 2 us -> 246 us +- 2 us: 1.00x faster

Benchmark hidden because not significant (13): 2to3, fannkuch, html5lib, json, pathlib, pickle_pure_python, regex_compile, regex_effbot, sqlalchemy_declarative, sqlalchemy_imperative, sqlite_synth, thrift, xml_etree_parse

Geometric mean: 1.01x faster

https://bugs.python.org/issue45923

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The oparg < 2 check can be done when quickening.

TARGET(RESUME_QUICK) {
PREDICTED(RESUME_QUICK);
assert(tstate->cframe == &cframe);
assert(frame == cframe.current_frame);
frame->f_state = FRAME_EXECUTING;
if (_Py_atomic_load_relaxed(eval_breaker) && oparg < 2) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specializer should handle the oparg < 2.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@markshannon
Copy link
Member

I note that #31240 also shows a ~1% speedup.
I wonder, is this a slow common base build, or two independent speedups?

@brandtbucher
Copy link
Member Author

brandtbucher commented Feb 10, 2022

I note that #31240 also shows a ~1% speedup. I wonder, is this a slow common base build, or two independent speedups?

I'm pretty sure they're independent, since even though the main base changeset is the same, they use two different builds and two different pyperformance runs.

All four combinations of PR branches and main runs show a 1% improvement:

  • resume-quick vs main (from this PR)

    • Slower (18):
      - nqueens: 85.1 ms +- 1.6 ms -> 86.8 ms +- 0.8 ms: 1.02x slower
      - pickle: 10.1 us +- 0.2 us -> 10.3 us +- 0.3 us: 1.02x slower
      - regex_dna: 231 ms +- 1 ms -> 233 ms +- 1 ms: 1.01x slower
      - sympy_expand: 493 ms +- 3 ms -> 498 ms +- 6 ms: 1.01x slower
      - deltablue: 4.06 ms +- 0.06 ms -> 4.09 ms +- 0.07 ms: 1.01x slower
      - json_loads: 27.0 us +- 0.3 us -> 27.2 us +- 0.5 us: 1.01x slower
      - meteor_contest: 104 ms +- 0 ms -> 105 ms +- 1 ms: 1.01x slower
      - xml_etree_generate: 78.5 ms +- 0.5 ms -> 79.0 ms +- 0.5 ms: 1.01x slower
      - chameleon: 6.86 ms +- 0.05 ms -> 6.89 ms +- 0.07 ms: 1.01x slower
      - tornado_http: 97.7 ms +- 1.2 ms -> 98.2 ms +- 1.3 ms: 1.01x slower
      - sympy_sum: 166 ms +- 2 ms -> 167 ms +- 2 ms: 1.00x slower
      - xml_etree_process: 55.9 ms +- 0.5 ms -> 56.2 ms +- 0.6 ms: 1.00x slower
      - sympy_str: 295 ms +- 3 ms -> 296 ms +- 3 ms: 1.00x slower
      - regex_v8: 25.2 ms +- 0.2 ms -> 25.3 ms +- 0.1 ms: 1.00x slower
      - dulwich_log: 65.6 ms +- 0.3 ms -> 65.8 ms +- 0.4 ms: 1.00x slower
      - sympy_integrate: 21.0 ms +- 0.1 ms -> 21.0 ms +- 0.2 ms: 1.00x slower
      - python_startup_no_site: 6.00 ms +- 0.00 ms -> 6.01 ms +- 0.00 ms: 1.00x slower
      - python_startup: 8.69 ms +- 0.01 ms -> 8.70 ms +- 0.01 ms: 1.00x slower
      
      Faster (31):
      - scimark_sparse_mat_mult: 5.02 ms +- 0.02 ms -> 4.80 ms +- 0.09 ms: 1.04x faster
      - logging_silent: 110 ns +- 1 ns -> 106 ns +- 2 ns: 1.04x faster
      - telco: 6.65 ms +- 0.25 ms -> 6.40 ms +- 0.14 ms: 1.04x faster
      - scimark_fft: 342 ms +- 2 ms -> 330 ms +- 2 ms: 1.04x faster
      - pickle_list: 4.53 us +- 0.07 us -> 4.38 us +- 0.06 us: 1.04x faster
      - unpickle_list: 5.27 us +- 0.08 us -> 5.09 us +- 0.04 us: 1.03x faster
      - richards: 50.5 ms +- 1.3 ms -> 48.9 ms +- 1.3 ms: 1.03x faster
      - mako: 10.6 ms +- 0.1 ms -> 10.3 ms +- 0.1 ms: 1.03x faster
      - pyflate: 460 ms +- 3 ms -> 448 ms +- 8 ms: 1.03x faster
      - crypto_pyaes: 86.4 ms +- 1.2 ms -> 84.3 ms +- 0.9 ms: 1.02x faster
      - unpack_sequence: 46.1 ns +- 0.5 ns -> 45.1 ns +- 0.7 ns: 1.02x faster
      - nbody: 96.3 ms +- 1.3 ms -> 94.3 ms +- 2.3 ms: 1.02x faster
      - unpickle: 14.2 us +- 0.1 us -> 13.9 us +- 0.2 us: 1.02x faster
      - float: 77.5 ms +- 1.1 ms -> 76.2 ms +- 0.9 ms: 1.02x faster
      - pickle_dict: 28.5 us +- 0.1 us -> 28.0 us +- 0.1 us: 1.02x faster
      - django_template: 35.2 ms +- 0.4 ms -> 34.6 ms +- 0.3 ms: 1.02x faster
      - scimark_monte_carlo: 71.7 ms +- 0.9 ms -> 70.6 ms +- 1.2 ms: 1.01x faster
      - go: 144 ms +- 2 ms -> 142 ms +- 1 ms: 1.01x faster
      - scimark_lu: 118 ms +- 4 ms -> 116 ms +- 2 ms: 1.01x faster
      - pidigits: 194 ms +- 0 ms -> 192 ms +- 0 ms: 1.01x faster
      - pycparser: 1.18 sec +- 0.02 sec -> 1.17 sec +- 0.01 sec: 1.01x faster
      - scimark_sor: 125 ms +- 1 ms -> 124 ms +- 2 ms: 1.01x faster
      - spectral_norm: 103 ms +- 1 ms -> 101 ms +- 3 ms: 1.01x faster
      - logging_format: 6.03 us +- 0.10 us -> 5.96 us +- 0.09 us: 1.01x faster
      - json_dumps: 12.3 ms +- 0.1 ms -> 12.2 ms +- 0.1 ms: 1.01x faster
      - logging_simple: 5.49 us +- 0.08 us -> 5.43 us +- 0.08 us: 1.01x faster
      - raytrace: 317 ms +- 6 ms -> 314 ms +- 6 ms: 1.01x faster
      - chaos: 73.5 ms +- 1.4 ms -> 73.0 ms +- 0.6 ms: 1.01x faster
      - xml_etree_iterparse: 105 ms +- 1 ms -> 105 ms +- 1 ms: 1.01x faster
      - hexiom: 6.61 ms +- 0.04 ms -> 6.58 ms +- 0.04 ms: 1.00x faster
      - unpickle_pure_python: 247 us +- 2 us -> 246 us +- 2 us: 1.00x faster
      
      Benchmark hidden because not significant (13): 2to3, fannkuch, html5lib, json, pathlib, pickle_pure_python, regex_compile, regex_effbot, sqlalchemy_declarative, sqlalchemy_imperative, sqlite_synth, thrift, xml_etree_parse
      
      Geometric mean: 1.01x faster
      
  • resume-quick vs main (from bpo-46702: Specialize UNPACK_SEQUENCE #31240)

    • Slower (10):
      - regex_dna: 208 ms +- 1 ms -> 233 ms +- 1 ms: 1.12x slower
      - regex_effbot: 3.11 ms +- 0.04 ms -> 3.43 ms +- 0.03 ms: 1.10x slower
      - regex_v8: 23.4 ms +- 0.3 ms -> 25.3 ms +- 0.1 ms: 1.08x slower
      - pickle: 9.99 us +- 0.11 us -> 10.3 us +- 0.3 us: 1.03x slower
      - nqueens: 84.9 ms +- 0.5 ms -> 86.8 ms +- 0.8 ms: 1.02x slower
      - json_loads: 26.9 us +- 0.3 us -> 27.2 us +- 0.5 us: 1.01x slower
      - pycparser: 1.15 sec +- 0.02 sec -> 1.17 sec +- 0.01 sec: 1.01x slower
      - meteor_contest: 104 ms +- 0 ms -> 105 ms +- 1 ms: 1.01x slower
      - json_dumps: 12.1 ms +- 0.1 ms -> 12.2 ms +- 0.1 ms: 1.01x slower
      - python_startup: 8.70 ms +- 0.01 ms -> 8.70 ms +- 0.01 ms: 1.00x slower
      
      Faster (36):
      - unpack_sequence: 51.4 ns +- 0.5 ns -> 45.1 ns +- 0.7 ns: 1.14x faster
      - logging_silent: 114 ns +- 0 ns -> 106 ns +- 2 ns: 1.08x faster
      - pickle_list: 4.72 us +- 0.06 us -> 4.38 us +- 0.06 us: 1.08x faster
      - scimark_sparse_mat_mult: 5.07 ms +- 0.12 ms -> 4.80 ms +- 0.09 ms: 1.06x faster
      - pidigits: 202 ms +- 0 ms -> 192 ms +- 0 ms: 1.05x faster
      - float: 79.7 ms +- 0.9 ms -> 76.2 ms +- 0.9 ms: 1.05x faster
      - scimark_fft: 346 ms +- 3 ms -> 330 ms +- 2 ms: 1.05x faster
      - hexiom: 6.86 ms +- 0.03 ms -> 6.58 ms +- 0.04 ms: 1.04x faster
      - richards: 50.9 ms +- 1.6 ms -> 48.9 ms +- 1.3 ms: 1.04x faster
      - go: 147 ms +- 2 ms -> 142 ms +- 1 ms: 1.03x faster
      - pickle_dict: 28.9 us +- 0.1 us -> 28.0 us +- 0.1 us: 1.03x faster
      - chaos: 75.2 ms +- 0.9 ms -> 73.0 ms +- 0.6 ms: 1.03x faster
      - scimark_sor: 127 ms +- 1 ms -> 124 ms +- 2 ms: 1.03x faster
      - spectral_norm: 104 ms +- 1 ms -> 101 ms +- 3 ms: 1.03x faster
      - raytrace: 322 ms +- 3 ms -> 314 ms +- 6 ms: 1.03x faster
      - scimark_monte_carlo: 72.3 ms +- 0.8 ms -> 70.6 ms +- 1.2 ms: 1.02x faster
      - mako: 10.6 ms +- 0.1 ms -> 10.3 ms +- 0.1 ms: 1.02x faster
      - unpickle_pure_python: 251 us +- 2 us -> 246 us +- 2 us: 1.02x faster
      - pickle_pure_python: 335 us +- 3 us -> 329 us +- 5 us: 1.02x faster
      - nbody: 95.8 ms +- 2.7 ms -> 94.3 ms +- 2.3 ms: 1.02x faster
      - regex_compile: 140 ms +- 1 ms -> 138 ms +- 1 ms: 1.02x faster
      - scimark_lu: 118 ms +- 2 ms -> 116 ms +- 2 ms: 1.02x faster
      - xml_etree_process: 56.8 ms +- 0.5 ms -> 56.2 ms +- 0.6 ms: 1.01x faster
      - unpickle: 14.1 us +- 0.3 us -> 13.9 us +- 0.2 us: 1.01x faster
      - logging_format: 6.03 us +- 0.09 us -> 5.96 us +- 0.09 us: 1.01x faster
      - xml_etree_generate: 79.7 ms +- 0.9 ms -> 79.0 ms +- 0.5 ms: 1.01x faster
      - telco: 6.46 ms +- 0.13 ms -> 6.40 ms +- 0.14 ms: 1.01x faster
      - django_template: 34.9 ms +- 0.3 ms -> 34.6 ms +- 0.3 ms: 1.01x faster
      - chameleon: 6.95 ms +- 0.12 ms -> 6.89 ms +- 0.07 ms: 1.01x faster
      - sympy_sum: 168 ms +- 1 ms -> 167 ms +- 2 ms: 1.01x faster
      - xml_etree_iterparse: 106 ms +- 1 ms -> 105 ms +- 1 ms: 1.01x faster
      - sympy_str: 297 ms +- 3 ms -> 296 ms +- 3 ms: 1.00x faster
      - dulwich_log: 66.1 ms +- 0.4 ms -> 65.8 ms +- 0.4 ms: 1.00x faster
      - sympy_integrate: 21.1 ms +- 0.1 ms -> 21.0 ms +- 0.2 ms: 1.00x faster
      - 2to3: 268 ms +- 1 ms -> 267 ms +- 1 ms: 1.00x faster
      - python_startup_no_site: 6.01 ms +- 0.00 ms -> 6.01 ms +- 0.00 ms: 1.00x faster
      
      Benchmark hidden because not significant (16): crypto_pyaes, deltablue, fannkuch, html5lib, json, logging_simple, pathlib, pyflate, sqlalchemy_declarative, sqlalchemy_imperative, sqlite_synth, sympy_expand, thrift, tornado_http, unpickle_list, xml_etree_parse
      
      Geometric mean: 1.01x faster
      
  • unpack-sequence vs main (from this PR)

    • Slower (17):
      - unpack_sequence: 46.1 ns +- 0.5 ns -> 47.6 ns +- 0.8 ns: 1.03x slower
      - richards: 50.5 ms +- 1.3 ms -> 51.8 ms +- 1.3 ms: 1.03x slower
      - spectral_norm: 103 ms +- 1 ms -> 105 ms +- 2 ms: 1.02x slower
      - nbody: 96.3 ms +- 1.3 ms -> 97.9 ms +- 3.3 ms: 1.02x slower
      - float: 77.5 ms +- 1.1 ms -> 78.5 ms +- 1.0 ms: 1.01x slower
      - hexiom: 6.61 ms +- 0.04 ms -> 6.68 ms +- 0.06 ms: 1.01x slower
      - regex_compile: 138 ms +- 1 ms -> 139 ms +- 1 ms: 1.01x slower
      - pickle_pure_python: 330 us +- 2 us -> 333 us +- 2 us: 1.01x slower
      - deltablue: 4.06 ms +- 0.06 ms -> 4.09 ms +- 0.04 ms: 1.01x slower
      - xml_etree_generate: 78.5 ms +- 0.5 ms -> 79.1 ms +- 0.5 ms: 1.01x slower
      - go: 144 ms +- 2 ms -> 145 ms +- 1 ms: 1.01x slower
      - unpickle_pure_python: 247 us +- 2 us -> 248 us +- 2 us: 1.01x slower
      - xml_etree_process: 55.9 ms +- 0.5 ms -> 56.2 ms +- 0.5 ms: 1.01x slower
      - sympy_sum: 166 ms +- 2 ms -> 167 ms +- 2 ms: 1.00x slower
      - sympy_str: 295 ms +- 3 ms -> 296 ms +- 3 ms: 1.00x slower
      - sympy_integrate: 21.0 ms +- 0.1 ms -> 21.0 ms +- 0.2 ms: 1.00x slower
      - dulwich_log: 65.6 ms +- 0.3 ms -> 65.7 ms +- 0.4 ms: 1.00x slower
      
      Faster (26):
      - regex_dna: 231 ms +- 1 ms -> 207 ms +- 1 ms: 1.12x faster
      - regex_effbot: 3.42 ms +- 0.03 ms -> 3.10 ms +- 0.06 ms: 1.10x faster
      - regex_v8: 25.2 ms +- 0.2 ms -> 23.4 ms +- 0.4 ms: 1.07x faster
      - unpickle_list: 5.27 us +- 0.08 us -> 4.99 us +- 0.05 us: 1.05x faster
      - pidigits: 194 ms +- 0 ms -> 188 ms +- 0 ms: 1.03x faster
      - mako: 10.6 ms +- 0.1 ms -> 10.4 ms +- 0.1 ms: 1.03x faster
      - logging_silent: 110 ns +- 1 ns -> 108 ns +- 1 ns: 1.02x faster
      - pickle_list: 4.53 us +- 0.07 us -> 4.44 us +- 0.04 us: 1.02x faster
      - scimark_sparse_mat_mult: 5.02 ms +- 0.02 ms -> 4.94 ms +- 0.18 ms: 1.02x faster
      - chaos: 73.5 ms +- 1.4 ms -> 72.4 ms +- 0.8 ms: 1.02x faster
      - telco: 6.65 ms +- 0.25 ms -> 6.57 ms +- 0.10 ms: 1.01x faster
      - scimark_fft: 342 ms +- 2 ms -> 339 ms +- 3 ms: 1.01x faster
      - pyflate: 460 ms +- 3 ms -> 455 ms +- 3 ms: 1.01x faster
      - chameleon: 6.86 ms +- 0.05 ms -> 6.80 ms +- 0.08 ms: 1.01x faster
      - nqueens: 85.1 ms +- 1.6 ms -> 84.4 ms +- 1.0 ms: 1.01x faster
      - logging_format: 6.03 us +- 0.10 us -> 5.98 us +- 0.07 us: 1.01x faster
      - fannkuch: 396 ms +- 4 ms -> 393 ms +- 3 ms: 1.01x faster
      - json_loads: 27.0 us +- 0.3 us -> 26.8 us +- 0.3 us: 1.01x faster
      - pycparser: 1.18 sec +- 0.02 sec -> 1.17 sec +- 0.02 sec: 1.01x faster
      - xml_etree_iterparse: 105 ms +- 1 ms -> 105 ms +- 1 ms: 1.01x faster
      - python_startup: 8.69 ms +- 0.01 ms -> 8.64 ms +- 0.01 ms: 1.01x faster
      - python_startup_no_site: 6.00 ms +- 0.00 ms -> 5.97 ms +- 0.00 ms: 1.01x faster
      - pickle_dict: 28.5 us +- 0.1 us -> 28.3 us +- 0.1 us: 1.01x faster
      - pathlib: 18.7 ms +- 0.2 ms -> 18.7 ms +- 0.2 ms: 1.00x faster
      - meteor_contest: 104 ms +- 0 ms -> 104 ms +- 0 ms: 1.00x faster
      - 2to3: 267 ms +- 1 ms -> 266 ms +- 1 ms: 1.00x faster
      
      Benchmark hidden because not significant (19): crypto_pyaes, django_template, html5lib, json, json_dumps, logging_simple, pickle, raytrace, scimark_lu, scimark_monte_carlo, scimark_sor, sqlalchemy_declarative, sqlalchemy_imperative, sqlite_synth, sympy_expand, thrift, tornado_http, unpickle, xml_etree_parse
      
      Geometric mean: 1.01x faster
      
  • unpack-sequence vs main (from bpo-46702: Specialize UNPACK_SEQUENCE #31240)

    • Slower (11):
      - crypto_pyaes: 84.3 ms +- 0.5 ms -> 86.5 ms +- 0.9 ms: 1.03x slower
      - nbody: 95.8 ms +- 2.7 ms -> 97.9 ms +- 3.3 ms: 1.02x slower
      - json_dumps: 12.1 ms +- 0.1 ms -> 12.3 ms +- 0.1 ms: 1.02x slower
      - richards: 50.9 ms +- 1.6 ms -> 51.8 ms +- 1.3 ms: 1.02x slower
      - pycparser: 1.15 sec +- 0.02 sec -> 1.17 sec +- 0.02 sec: 1.02x slower
      - telco: 6.46 ms +- 0.13 ms -> 6.57 ms +- 0.10 ms: 1.02x slower
      - pyflate: 448 ms +- 3 ms -> 455 ms +- 3 ms: 1.01x slower
      - pickle: 9.99 us +- 0.11 us -> 10.1 us +- 0.4 us: 1.01x slower
      - logging_simple: 5.46 us +- 0.08 us -> 5.51 us +- 0.08 us: 1.01x slower
      - django_template: 34.9 ms +- 0.3 ms -> 35.1 ms +- 0.5 ms: 1.01x slower
      - thrift: 807 us +- 11 us -> 812 us +- 14 us: 1.01x slower
      
      Faster (37):
      - unpack_sequence: 51.4 ns +- 0.5 ns -> 47.6 ns +- 0.8 ns: 1.08x faster
      - pidigits: 202 ms +- 0 ms -> 188 ms +- 0 ms: 1.07x faster
      - pickle_list: 4.72 us +- 0.06 us -> 4.44 us +- 0.04 us: 1.06x faster
      - logging_silent: 114 ns +- 0 ns -> 108 ns +- 1 ns: 1.06x faster
      - chaos: 75.2 ms +- 0.9 ms -> 72.4 ms +- 0.8 ms: 1.04x faster
      - hexiom: 6.86 ms +- 0.03 ms -> 6.68 ms +- 0.06 ms: 1.03x faster
      - scimark_sparse_mat_mult: 5.07 ms +- 0.12 ms -> 4.94 ms +- 0.18 ms: 1.03x faster
      - chameleon: 6.95 ms +- 0.12 ms -> 6.80 ms +- 0.08 ms: 1.02x faster
      - scimark_fft: 346 ms +- 3 ms -> 339 ms +- 3 ms: 1.02x faster
      - raytrace: 322 ms +- 3 ms -> 316 ms +- 4 ms: 1.02x faster
      - unpickle_list: 5.09 us +- 0.08 us -> 4.99 us +- 0.05 us: 1.02x faster
      - mako: 10.6 ms +- 0.1 ms -> 10.4 ms +- 0.1 ms: 1.02x faster
      - pickle_dict: 28.9 us +- 0.1 us -> 28.3 us +- 0.1 us: 1.02x faster
      - float: 79.7 ms +- 0.9 ms -> 78.5 ms +- 1.0 ms: 1.02x faster
      - scimark_sor: 127 ms +- 1 ms -> 126 ms +- 1 ms: 1.01x faster
      - go: 147 ms +- 2 ms -> 145 ms +- 1 ms: 1.01x faster
      - xml_etree_process: 56.8 ms +- 0.5 ms -> 56.2 ms +- 0.5 ms: 1.01x faster
      - unpickle_pure_python: 251 us +- 2 us -> 248 us +- 2 us: 1.01x faster
      - scimark_monte_carlo: 72.3 ms +- 0.8 ms -> 71.6 ms +- 1.5 ms: 1.01x faster
      - fannkuch: 396 ms +- 12 ms -> 393 ms +- 3 ms: 1.01x faster
      - logging_format: 6.03 us +- 0.09 us -> 5.98 us +- 0.07 us: 1.01x faster
      - xml_etree_generate: 79.7 ms +- 0.9 ms -> 79.1 ms +- 0.5 ms: 1.01x faster
      - python_startup_no_site: 6.01 ms +- 0.00 ms -> 5.97 ms +- 0.00 ms: 1.01x faster
      - regex_dna: 208 ms +- 1 ms -> 207 ms +- 1 ms: 1.01x faster
      - sympy_expand: 497 ms +- 5 ms -> 494 ms +- 3 ms: 1.01x faster
      - pathlib: 18.8 ms +- 0.2 ms -> 18.7 ms +- 0.2 ms: 1.01x faster
      - xml_etree_iterparse: 106 ms +- 1 ms -> 105 ms +- 1 ms: 1.01x faster
      - sympy_sum: 168 ms +- 1 ms -> 167 ms +- 2 ms: 1.01x faster
      - python_startup: 8.70 ms +- 0.01 ms -> 8.64 ms +- 0.01 ms: 1.01x faster
      - nqueens: 84.9 ms +- 0.5 ms -> 84.4 ms +- 1.0 ms: 1.01x faster
      - regex_compile: 140 ms +- 1 ms -> 139 ms +- 1 ms: 1.01x faster
      - pickle_pure_python: 335 us +- 3 us -> 333 us +- 2 us: 1.01x faster
      - 2to3: 268 ms +- 1 ms -> 266 ms +- 1 ms: 1.01x faster
      - dulwich_log: 66.1 ms +- 0.4 ms -> 65.7 ms +- 0.4 ms: 1.01x faster
      - deltablue: 4.11 ms +- 0.04 ms -> 4.09 ms +- 0.04 ms: 1.01x faster
      - sympy_integrate: 21.1 ms +- 0.1 ms -> 21.0 ms +- 0.2 ms: 1.00x faster
      - sympy_str: 297 ms +- 3 ms -> 296 ms +- 3 ms: 1.00x faster
      
      Benchmark hidden because not significant (14): html5lib, json, json_loads, meteor_contest, regex_effbot, regex_v8, scimark_lu, spectral_norm, sqlalchemy_declarative, sqlalchemy_imperative, sqlite_synth, tornado_http, unpickle, xml_etree_parse
      
      Geometric mean: 1.01x faster
      

I know the UK benchmarking machine is a bit more stable than the US one, though, so if you want to verify those numbers I won't be offended. 🙃

@markshannon
Copy link
Member

I think your analysis is sound, and they look like good changes anyway, even if there were some correlation.

@markshannon
Copy link
Member

OK, merging this. We can quicken RESUME (oparg <2) to NOP once f_state has been removed.

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