mirror of https://github.com/python/cpython.git
[3.11] gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list (GH-116577) (#116583)
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
982f457f6f
commit
34e808ec6c
|
@ -130,7 +130,8 @@ def run(self, loops: int) -> float:
|
||||||
|
|
||||||
def _prepare_data(self, loops: int) -> list[float]:
|
def _prepare_data(self, loops: int) -> list[float]:
|
||||||
bench = BENCHMARKS[self._name]
|
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:
|
def add_cmdline_args(cmd: list[str], args) -> None:
|
||||||
|
|
Loading…
Reference in New Issue