Improve performance of HREF/HREFK on x64.

This commit is contained in:
Mike Pall
2010-03-03 04:26:31 +01:00
parent 5fdb6e2e20
commit 15c3bd7725
2 changed files with 43 additions and 4 deletions

View File

@@ -22,7 +22,7 @@
/* String hashes are precomputed when they are interned. */
#define hashstr(t, s) hashmask(t, (s)->hash)
#define hashnum(t, o) hashrot(t, (o)->u32.lo, (o)->u32.hi&0x7fffffff)
#define hashnum(t, o) hashrot(t, (o)->u32.lo, ((o)->u32.hi << 1))
#define hashgcref(t, r) hashrot(t, gcrefu(r), gcrefu(r)-0x04c11db7)
/* Scramble the bits of numbers and pointers. */