diff options
author | Guido van Rossum <guido@python.org> | 1995-03-09 12:12:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-03-09 12:12:50 (GMT) |
commit | 5fe605889a52bc2a34e1d883df14e6cc56ee87a3 (patch) | |
tree | 338857070fb7a49a861c7dbb33fd47200ba35324 /Objects/stringobject.c | |
parent | 8d617a60b1d183af24278be8dc1597ee19fe7931 (diff) | |
download | cpython-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.zip cpython-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.tar.gz cpython-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.tar.bz2 |
a few peephole optimizations
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index cb76d77..b09fc25 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -419,7 +419,7 @@ string_hash(a) p = (unsigned char *) a->ob_sval; x = *p << 7; while (--len >= 0) - x = (x + x + x) ^ *p++; + x = (3*x) ^ *p++; x ^= a->ob_size; if (x == -1) x = -2; |