Skip to content

Commit fafb430

Browse files
sobolevndiegorusso
authored andcommitted
pythongh-116576: Fix Tools/scripts/sortperf.py sorting the same list (python#116577)
1 parent 4c98d65 commit fafb430

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)