Title: Add sorted.py to microbenchmarks by jackoconnordev · Pull Request #6086 · RustPython/RustPython · GitHub
Open Graph Title: Add sorted.py to microbenchmarks by jackoconnordev · Pull Request #6086 · RustPython/RustPython
X Title: Add sorted.py to microbenchmarks by jackoconnordev · Pull Request #6086 · RustPython/RustPython
Description: Description Adds a new microbenchmark for sorted (and by extension sort) builtin functions Documents how to run individual benchmarks to the relevant README. I chose 5 * ITERATIONS to better show the divergence between the sort implementations, while trying to avoid individual microbenchmark runs timing out. Sample benchmark results Violin plot Line Chart Manually benchmark Using larger list sizes really shows the difference. Sorting 1_000_000 random numbers: CPython => 0.3 seconds RustPython => ~17 minutes ✦ ❯ time python -c "from random import random; sorted([random() for i in range(1_000_000)]); print('DONE');" DONE real 0m0.309s user 0m0.274s sys 0m0.036s ✦ ❯ time cargo run --release -- -c "from random import random; sorted([random() for i in range(1_000_000)]); print('DONE');" Finished `release` profile [optimized] target(s) in 0.16s Running `target/release/rustpython -c 'from random import random; sorted([random() for i in range(1_000_000)]); print('\''DONE'\'');'` DONE real 16m52.217s user 16m51.926s sys 0m0.174s Summary by CodeRabbit Tests Added a deterministic Python microbenchmark for sorting to the benchmark suite. Documentation Documented running benchmark subsets by name (e.g., run specific benchmarks). Noted that a graphical benchmark report is generated after runs. Updated Python invocation example to use python3.13. Minor wording, header, and formatting refinements in the benchmark README.
Open Graph Description: Description Adds a new microbenchmark for sorted (and by extension sort) builtin functions Documents how to run individual benchmarks to the relevant README. I chose 5 * ITERATIONS to better show...
X Description: Description Adds a new microbenchmark for sorted (and by extension sort) builtin functions Documents how to run individual benchmarks to the relevant README. I chose 5 * ITERATIONS to better show...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6086
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:2d4b46d6-095c-8783-0556-6e9150cb35b9 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 8DDC:3372CB:48059D:64A5C3:696A6B75 |
| html-safe-nonce | 954b77acd093c75fcd9192a1b66b609d7ec91ea6cfdfb161b698c82f2144cb42 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RERDOjMzNzJDQjo0ODA1OUQ6NjRBNUMzOjY5NkE2Qjc1IiwidmlzaXRvcl9pZCI6IjI0MDQwNTMzMzUxOTU0MTMzNjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7fd86f64f2b98d06e24fe52500391e8daf963d21d22758636478baa642ac0180 |
| hovercard-subject-tag | pull_request:2733047195 |
| 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/RustPython/RustPython/pull/6086/checks |
| twitter:image | https://avatars.githubusercontent.com/u/134723582?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/134723582?s=400&v=4 |
| og:image:alt | Description Adds a new microbenchmark for sorted (and by extension sort) builtin functions Documents how to run individual benchmarks to the relevant README. I chose 5 * ITERATIONS to better show... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6fea32d5b7276b841b7a803796d9715bc6cfb31ed549fdf9de2948ac25d12ba6 |
| turbo-cache-control | no-cache |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | f2d9f6432a5a115ec709295ae70623f33bb80aee |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width