mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
[3.12] gh-116576: Fix Tools/scripts/sortperf.py
sorting the same list (GH-116577) (#116582)
gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list (GH-116577)
(cherry picked from commit 4704e55a71
)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
0d5455fc7f
commit
de239beaec
1 changed files with 2 additions and 1 deletions
|
@ -130,7 +130,8 @@ class Benchmark:
|
|||
|
||||
def _prepare_data(self, loops: int) -> list[float]:
|
||||
bench = BENCHMARKS[self._name]
|
||||
return [bench(self._size, self._random)] * loops
|
||||
data = bench(self._size, self._random)
|
||||
return [data.copy() for _ in range(loops)]
|
||||
|
||||
|
||||
def add_cmdline_args(cmd: list[str], args) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue