What's the best hashing algorithm to use on a stl string when using hash_map?

前端 未结 11 2331
生来不讨喜
生来不讨喜 2020-12-04 10:41

I\'ve found the standard hashing function on VS2005 is painfully slow when trying to achieve high performance look ups. What are some good examples of fast and efficient has

11条回答
  •  醉话见心
    2020-12-04 11:35

    I've use the Jenkins hash to write a Bloom filter library, it has great performance.

    Details and code are available here: http://burtleburtle.net/bob/c/lookup3.c

    This is what Perl uses for its hashing operation, fwiw.

提交回复
热议问题