MCPcopy Index your code
hub / github.com/python/cpython / list_sort_duplicates

Function list_sort_duplicates

Tools/scripts/sortperf.py:84–91  ·  view source on GitHub ↗
(size: int, rand: random.Random)

Source from the content-addressed store, hash-verified

82
83
84def list_sort_duplicates(size: int, rand: random.Random) -> list[float]:
85 assert size >= 4
86 result = list_sort_ascending(4, rand)
87 # Arrange for lots of duplicates.
88 result = result * (size // 4)
89 # Force the elements to be distinct objects, else timings can be
90 # artificially low.
91 return list(map(abs, result))
92
93
94def list_sort_equal(size: int, rand: random.Random) -> list[float]:

Callers

nothing calls this directly

Calls 2

list_sort_ascendingFunction · 0.85
listClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…