mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
a few peephole optimizations
This commit is contained in:
parent
8d617a60b1
commit
5fe605889a
5 changed files with 12 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue