mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
* Add microbenchmark for `sorted` I chose 5 * Iterations to try better show that RustPython sort implementation scales noticeably worse CPython's with respect to the number of elements. * Mention how to run a specific benchmark * Update python version in bench README 3.13 better reflects the current state of the project vs 3.7.
10 lines
183 B
Python
10 lines
183 B
Python
from random import random, seed
|
|
seed(0)
|
|
|
|
unsorted_list = [random() for _ in range(5 * ITERATIONS)]
|
|
|
|
# ---
|
|
|
|
# Setup code only runs once so do not modify in-place
|
|
sorted(unsorted_list)
|