A minimal hash function for C?

后端 未结 6 534
攒了一身酷
攒了一身酷 2021-01-29 23:41

I can\'t use boost:hash because I have to stick with C and can\'t use C++.

But, I need to hash a large number (10K to 100k) of tokens strings (5 to 40 bytes length) so t

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 00:11

    If you're on a posix alike system and sticking to plain C, I would simply use what the system already has to offer. man 3 hcreate offers you all details or you can find an online version here http://linux.die.net/man/3/hcreate

提交回复
热议问题