> On Nov 29, 2013, at 2:19 PM, Graham Cox <graham....@bigpond.com> wrote:

> 
> 
>> On 29 Nov 2013, at 10:49 pm, Kyle Sluder <k...@ksluder.com> wrote:
>> 
>> In this scheme, if there is a hash collision, you lose user data. That 
>> should be a non-starter. You *must* do a full bytewise comparison in case of 
>> collision.
> 
> I wouldn’t say a non-starter. In practice, the odds of this are exceedingly 
> small *provided* the hash function is good.

Much as a civil engineer would find it unconscionable to knowingly choose a 
bridge design that could not be guaranteed to support the design load, so too 
should a software engineer instinctively avoid any solution that they know has 
even a remote possibility of losing data under normal operation.

Plus, since you're already keying by size, you can afford to use a faster but 
higher-collision hashing algorithm.

--Kyle Sluder
_______________________________________________

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