diff options
| author | Guido van Rossum <guido@python.org> | 1995-03-09 12:12:50 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1995-03-09 12:12:50 +0000 |
| commit | 5fe605889a52bc2a34e1d883df14e6cc56ee87a3 (patch) | |
| tree | 338857070fb7a49a861c7dbb33fd47200ba35324 /Objects/stringobject.c | |
| parent | 8d617a60b1d183af24278be8dc1597ee19fe7931 (diff) | |
| download | cpython-git-5fe605889a52bc2a34e1d883df14e6cc56ee87a3.tar.gz | |
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 cb76d77f68..b09fc2546d 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; |
