Skip to content

Commit

Permalink
pythongh-116576: Fix Tools/scripts/sortperf.py sorting the same list (
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored and diegorusso committed Apr 17, 2024
1 parent 4c98d65 commit fafb430
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tools/scripts/sortperf.py
Expand Up @@ -130,7 +130,8 @@ def run(self, loops: int) -> float:

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:
Expand Down

0 comments on commit fafb430

Please sign in to comment.