[cfe-commits] [patch] change libc++'s string hash function to cityhash64

Howard Hinnant hhinnant at apple.com
Fri Dec 9 15:18:29 PST 2011


On Dec 9, 2011, at 6:14 PM, Craig Silverstein wrote:

> For fun, I also compared with the hash function that existed before
> Howard put in murmurhash2.  It did ok! -- though cityhash is still
> faster.  Normal caveats apply: this is just one dataset, and a well
> behaved one at that.  Here are all the results (viewed best in a
> fixed-width font):
> 
>                     orig        murmur2        cityhash64
> RUN TIME -O2          9.85        10.10             8.80
> COMPILE TIME -O2      1.08         1.08             1.08
> BINARY SIZE -O2      31148        31257            31402
> 
> RUN_TIME             16.75        16.20            15.60
> COMPILE_TIME          0.98         0.96             0.96
> BINARY_SIZE          71588        (not recorded)   76608
> 
> COMPILE_TIME -g       1.22         1.27             1.21
> BINARY_SIZE -g      335852       336295           346104

That's very useful information, thanks!

Howard




More information about the cfe-commits mailing list