summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-03-09 12:12:50 (GMT)
committerGuido van Rossum <guido@python.org>1995-03-09 12:12:50 (GMT)
commit5fe605889a52bc2a34e1d883df14e6cc56ee87a3 (patch)
tree338857070fb7a49a861c7dbb33fd47200ba35324 /Objects/dictobject.c
parent8d617a60b1d183af24278be8dc1597ee19fe7931 (diff)
downloadcpython-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.zip
cpython-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.tar.gz
cpython-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.tar.bz2
a few peephole optimizations
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index d74e74f..11d344a 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -133,7 +133,7 @@ lookmapping(mp, key, hash)
and 0 < incr < ma_size and both are a function of hash */
i = sum % mp->ma_size;
do {
- sum = sum + sum + sum + 1;
+ sum = 3*sum + 1;
incr = sum % mp->ma_size;
} while (incr == 0);
for (;;) {