summaryrefslogtreecommitdiffstats
path: root/Objects/mappingobject.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/mappingobject.c
parent8d617a60b1d183af24278be8dc1597ee19fe7931 (diff)
downloadcpython-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.zip
cpython-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.tar.gz
cpython-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.tar.bz2
a few peephole optimizations
Diffstat (limited to 'Objects/mappingobject.c')
-rw-r--r--Objects/mappingobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/mappingobject.c b/Objects/mappingobject.c
index d74e74f..11d344a 100644
--- a/Objects/mappingobject.c
+++ b/Objects/mappingobject.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 (;;) {