Title: bpo-26301: Add a fast-path for list[index] in BINARY_SUBSCR opcode by pablogsal · Pull Request #9853 · python/cpython · GitHub
Open Graph Title: bpo-26301: Add a fast-path for list[index] in BINARY_SUBSCR opcode by pablogsal · Pull Request #9853 · python/cpython
X Title: bpo-26301: Add a fast-path for list[index] in BINARY_SUBSCR opcode by pablogsal · Pull Request #9853 · python/cpython
Description: Based on a path by Zach Byrne and @vstinner. ./python -m perf timeit "l = [1,2,3,4,5,6]" "l[3]" -o old_index.json ./python -m perf timeit "l = [1,2,3,4,5,6]" "l[3]" -o new_index.json ./python -m perf compare_to old_index.json ../cpython/new_index.json Mean +- std dev: [old_index] 209 ns +- 8 ns -> [new_index] 194 ns +- 4 ns: 1.08x faster (-7%) Cache information BASELINE Performance counter stats for './python -c l = [1,2,3,4,5,6] for _ in range(1000): l[3]' (200 runs): 665,682 cache-references:u ( +- 0.08% ) 4,030 cache-misses:u # 0.605 % of all cache refs ( +- 7.73% ) 60,529,180 cycles:u ( +- 0.12% ) 87,335,803 instructions:u # 1.44 insn per cycle ( +- 0.01% ) 22,946,153 branches:u ( +- 0.01% ) 1,018 faults:u ( +- 0.01% ) 0 migrations:u 0.024963 +- 0.000185 seconds time elapsed ( +- 0.74% ) PATCH Performance counter stats for './python -c l = [1,2,3,4,5,6] for _ in range(1000): l[3]' (200 runs): 670,231 cache-references:u ( +- 0.09% ) 3,261 cache-misses:u # 0.487 % of all cache refs ( +- 7.23% ) 60,717,884 cycles:u ( +- 0.13% ) 86,998,772 instructions:u # 1.43 insn per cycle ( +- 0.01% ) 22,873,947 branches:u ( +- 0.01% ) 1,017 faults:u ( +- 0.01% ) 0 migrations:u 0.025440 +- 0.000182 seconds time elapsed ( +- 0.72% ) https://bugs.python.org/issue26301
Open Graph Description: Based on a path by Zach Byrne and @vstinner. ./python -m perf timeit "l = [1,2,3,4,5,6]" "l[3]" -o old_index.json ./python -m perf timeit "l = [1,2,3,4,5,6]" "l[3...
X Description: Based on a path by Zach Byrne and @vstinner. ./python -m perf timeit "l = [1,2,3,4,5,6]" "l[3]" -o old_index.json ./python -m perf timeit "l = [1,2,3,4,...
Opengraph URL: https://github.com/python/cpython/pull/9853
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:87176837-9d61-ddfb-6c8a-db7c4ab42f55 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 80AE:14BBA:278768D:35A3DE7:6A54392C |
| html-safe-nonce | 276cbe426f26156fea0ebbcae6f10553b76f48321d8859a25dc1afb8ea3c205d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEFFOjE0QkJBOjI3ODc2OEQ6MzVBM0RFNzo2QTU0MzkyQyIsInZpc2l0b3JfaWQiOiI4NTI5NjQ0OTk1Mzg4NjUxODIwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b3e2a84669313aa94520b2e7f1b8c9c2900ca74704e12b5f622a3271468a011a |
| hovercard-subject-tag | pull_request:222671684 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/9853/files |
| twitter:image | https://avatars.githubusercontent.com/u/11718525?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/11718525?s=400&v=4 |
| og:image:alt | Based on a path by Zach Byrne and @vstinner. ./python -m perf timeit "l = [1,2,3,4,5,6]" "l[3]" -o old_index.json ./python -m perf timeit "l = [1,2,3,4,5,6]" "l[3... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width