Skip to content

Commit 4704e55

Browse files
authored
gh-116576: Fix Tools/scripts/sortperf.py sorting the same list (#116577)
1 parent 2339e7c commit 4704e55

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)