Skip to content

Commit de239be

Browse files
[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 4704e55) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 0d5455f commit de239be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tools/scripts/sortperf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def run(self, loops: int) -> float:
130130

131131
def _prepare_data(self, loops: int) -> list[float]:
132132
bench = BENCHMARKS[self._name]
133-
return [bench(self._size, self._random)] * loops
133+
data = bench(self._size, self._random)
134+
return [data.copy() for _ in range(loops)]
134135

135136

136137
def add_cmdline_args(cmd: list[str], args) -> None:

0 commit comments

Comments
 (0)