8000 Reduce memory requirements. · python/cpython@b298a30 · GitHub
[go: up one dir, main page]

Skip to content

Commit b298a30

Browse files
committed
Reduce memory requirements.
1 parent e34ab30 commit b298a30

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/sortperf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ def tabulate(r):
9090
doit(L) # \sort
9191
doit(L) # /sort
9292
if n > 4:
93-
L = map(operator.neg, map(operator.neg, L[:4]*(n/4)))
93+
del L[4:]
94+
L = L*(n/4)
95+
L = map(lambda x: --x, L)
9496
doit(L) # ~sort
97+
del L
9598
L = map(abs, [-0.5]*n)
9699
doit(L) # -sort
97100
print

0 commit comments

Comments
 (0)
0