Title: GH-99298: Clean up attribute specializations by brandtbucher · Pull Request #99398 · python/cpython · GitHub
Open Graph Title: GH-99298: Clean up attribute specializations by brandtbucher · Pull Request #99398 · python/cpython
X Title: GH-99298: Clean up attribute specializations by brandtbucher · Pull Request #99398 · python/cpython
Description: It's now impossible for specialization to raise exceptions. Also, add an overly-cautious-but-inexpensive check for "unready" types when specializing STORE_ATTR, as we already do for LOAD_ATTR. Probably worth backporting this part manually? No performance impact: Details All benchmarks: =============== Slower (20): - mdp: 2.51 sec +- 0.02 sec -> 2.61 sec +- 0.01 sec: 1.04x slower - pickle_list: 4.03 us +- 0.03 us -> 4.17 us +- 0.04 us: 1.04x slower - scimark_sparse_mat_mult: 4.07 ms +- 0.07 ms -> 4.18 ms +- 0.06 ms: 1.03x slower - pathlib: 17.3 ms +- 0.2 ms -> 17.7 ms +- 0.4 ms: 1.02x slower - regex_effbot: 3.34 ms +- 0.02 ms -> 3.42 ms +- 0.03 ms: 1.02x slower - telco: 6.25 ms +- 0.22 ms -> 6.39 ms +- 0.19 ms: 1.02x slower - mako: 9.52 ms +- 0.06 ms -> 9.72 ms +- 0.05 ms: 1.02x slower - regex_dna: 202 ms +- 1 ms -> 206 ms +- 1 ms: 1.02x slower - django_template: 32.6 ms +- 0.5 ms -> 33.3 ms +- 0.3 ms: 1.02x slower - float: 71.5 ms +- 0.8 ms -> 72.9 ms +- 1.1 ms: 1.02x slower - fannkuch: 374 ms +- 11 ms -> 381 ms +- 15 ms: 1.02x slower - deltablue: 3.19 ms +- 0.04 ms -> 3.25 ms +- 0.04 ms: 1.02x slower - scimark_lu: 106 ms +- 2 ms -> 107 ms +- 4 ms: 1.01x slower - coverage: 98.1 ms +- 1.2 ms -> 99.4 ms +- 1.2 ms: 1.01x slower - nqueens: 81.1 ms +- 1.4 ms -> 82.2 ms +- 1.1 ms: 1.01x slower - hexiom: 6.06 ms +- 0.02 ms -> 6.14 ms +- 0.03 ms: 1.01x slower - xml_etree_iterparse: 104 ms +- 2 ms -> 106 ms +- 2 ms: 1.01x slower - richards: 41.7 ms +- 0.7 ms -> 42.1 ms +- 0.9 ms: 1.01x slower - scimark_fft: 311 ms +- 3 ms -> 313 ms +- 4 ms: 1.01x slower - crypto_pyaes: 74.1 ms +- 0.7 ms -> 74.4 ms +- 0.8 ms: 1.00x slower Faster (28): - unpack_sequence: 46.1 ns +- 4.1 ns -> 42.5 ns +- 0.8 ns: 1.08x faster - pidigits: 199 ms +- 0 ms -> 189 ms +- 0 ms: 1.05x faster - coroutines: 25.5 ms +- 0.2 ms -> 24.6 ms +- 0.2 ms: 1.04x faster - genshi_text: 21.1 ms +- 0.2 ms -> 20.4 ms +- 0.3 ms: 1.03x faster - pycparser: 1.08 sec +- 0.02 sec -> 1.05 sec +- 0.02 sec: 1.03x faster - logging_format: 6.34 us +- 0.10 us -> 6.23 us +- 0.07 us: 1.02x faster - logging_simple: 5.75 us +- 0.08 us -> 5.66 us +- 0.06 us: 1.02x faster - deepcopy_reduce: 2.94 us +- 0.04 us -> 2.89 us +- 0.04 us: 1.02x faster - unpickle_pure_python: 204 us +- 2 us -> 201 us +- 1 us: 1.01x faster - spectral_norm: 95.9 ms +- 3.8 ms -> 94.6 ms +- 2.6 ms: 1.01x faster - pickle: 10.3 us +- 0.1 us -> 10.2 us +- 0.1 us: 1.01x faster - pickle_dict: 31.3 us +- 0.1 us -> 31.0 us +- 0.1 us: 1.01x faster - sympy_sum: 163 ms +- 1 ms -> 162 ms +- 1 ms: 1.01x faster - sympy_str: 283 ms +- 4 ms -> 280 ms +- 4 ms: 1.01x faster - regex_v8: 21.2 ms +- 0.1 ms -> 21.0 ms +- 0.1 ms: 1.01x faster - generators: 78.7 ms +- 0.5 ms -> 78.0 ms +- 0.4 ms: 1.01x faster - json_loads: 24.2 us +- 0.4 us -> 24.0 us +- 0.2 us: 1.01x faster - json_dumps: 9.45 ms +- 0.18 ms -> 9.36 ms +- 0.13 ms: 1.01x faster - sympy_expand: 457 ms +- 3 ms -> 453 ms +- 7 ms: 1.01x faster - sympy_integrate: 20.3 ms +- 0.1 ms -> 20.2 ms +- 0.1 ms: 1.01x faster - sqlglot_transpile: 1.63 ms +- 0.02 ms -> 1.61 ms +- 0.02 ms: 1.01x faster - xml_etree_process: 53.2 ms +- 0.7 ms -> 52.8 ms +- 0.6 ms: 1.01x faster - python_startup_no_site: 6.27 ms +- 0.01 ms -> 6.22 ms +- 0.01 ms: 1.01x faster - genshi_xml: 46.9 ms +- 0.9 ms -> 46.6 ms +- 0.8 ms: 1.01x faster - sqlglot_normalize: 106 ms +- 1 ms -> 105 ms +- 1 ms: 1.01x faster - python_startup: 8.60 ms +- 0.01 ms -> 8.55 ms +- 0.01 ms: 1.01x faster - 2to3: 246 ms +- 1 ms -> 245 ms +- 1 ms: 1.01x faster - sqlglot_optimize: 50.9 ms +- 0.2 ms -> 50.7 ms +- 0.3 ms: 1.01x faster Benchmark hidden because not significant (34): aiohttp, async_tree_none, async_tree_cpu_io_mixed, async_tree_io, async_tree_memoization, chameleon, chaos, deepcopy, deepcopy_memo, dulwich_log, go, gunicorn, html5lib, json, logging_silent, meteor_contest, mypy, nbody, pickle_pure_python, pprint_safe_repr, pprint_pformat, pyflate, raytrace, regex_compile, scimark_monte_carlo, scimark_sor, sqlglot_parse, sqlite_synth, thrift, tornado_http, unpickle, unpickle_list, xml_etree_parse, xml_etree_generate Geometric mean: 1.00x faster Issue: gh-99298
Open Graph Description: It's now impossible for specialization to raise exceptions. Also, add an overly-cautious-but-inexpensive check for "unready" types when specializing STORE_ATTR, as we already do for L...
X Description: It's now impossible for specialization to raise exceptions. Also, add an overly-cautious-but-inexpensive check for "unready" types when specializing STORE_ATTR, as we alre...
Opengraph URL: https://github.com/python/cpython/pull/99398
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:e23c577b-f2ef-7fd4-4b7b-dbbd4d6bc54c |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 982A:219A86:C3274F:10C7BF8:6969F39A |
| html-safe-nonce | 5a0ad3d5d9e4b08981bc7913f6ee12fc68c4011f8192718575971d6a47670996 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODJBOjIxOUE4NjpDMzI3NEY6MTBDN0JGODo2OTY5RjM5QSIsInZpc2l0b3JfaWQiOiIyMDU2NDk4ODYwNzA2NjI0NDEwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8810201543765bbed79286383c3b4546221bb622299b44fe0de9ea569ab80b05 |
| hovercard-subject-tag | pull_request:1119560571 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/99398/checks |
| twitter:image | https://avatars.githubusercontent.com/u/40968415?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40968415?s=400&v=4 |
| og:image:alt | It's now impossible for specialization to raise exceptions. Also, add an overly-cautious-but-inexpensive check for "unready" types when specializing STORE_ATTR, as we already do for L... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width