Lines Matching refs:sort
61 L.sort()
67 r"""Tabulate sort speed for lists of various sizes.
71 The output displays i, 2**i, and the time to sort arrays of 2**i
74 *sort: random data
75 \sort: descending data
76 /sort: ascending data
77 3sort: ascending, then 3 random exchanges
78 +sort: ascending, then 10 random at the end
79 %sort: ascending, then randomly replace 1% of the elements w/ random values
80 ~sort: many duplicates
81 =sort: all equal
82 !sort: worst case scenario
85 cases = tuple([ch + "sort" for ch in r"*\/3+%~=!"])
93 doit(L) # *sort
95 doit(L) # \sort
96 doit(L) # /sort
103 doit(L) # 3sort
108 doit(L) # +sort
113 doit(L) # %sort
122 doit(L) # ~sort
127 doit(L) # =sort
139 doit(L) # !sort