On May 27, 2013, at 11:42 PM, Michael Crawford <mdcrawf...@gmail.com> wrote:

> For purposes of looking up strings in a hash table, a 32 bit CRC
> (Cyclic Redundancy Check) would be quick to calculate with few
> collisions.  It also doesn't require multiprecision arithmetic.

CRC is primarily a checksum, not a hash function. It's good for verifying data 
integrity, e.g. in a network protocol or file format, but more expensive than 
you’d like for a hash table. There are much faster hash functions: Wikipedia 
has a good list[1].

—Jens

[1] 
http://en.wikipedia.org/wiki/List_of_hash_functions#Non-cryptographic_hash_functions
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to