Re: Fast hash of NSData?
Re: Fast hash of NSData?
- Subject: Re: Fast hash of NSData?
- From: Scott Ribe <email@hidden>
- Date: Sun, 01 Dec 2013 09:00:16 -0700
On Dec 1, 2013, at 8:36 AM, Graham Cox <email@hidden> wrote:
> Scanning my entire hard drive (excluding hidden files), which took several hours, sure I had plenty of collisions - but absolutely no false ones - they all turned out to be genuine duplicates of existing files. This is using the FNV-1a 64-bit hash + length approach.
I have a drive sitting here that has a few *million* image files; I'd be willing to bet zero collisions. Maybe some time or other I'll try it out with my stripped down murmur hash.
What would be interesting, if you have the time, is figure out how much you can shorten the hash without collisions...
BTW, IIRC, one of the weaknesses with FNV has to do with strings of 0s, and as long as your image data is compressed, it will never contain long strings of 0s.
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden