Re: Fast hash of NSData?
Re: Fast hash of NSData?
- Subject: Re: Fast hash of NSData?
- From: Graham Cox <email@hidden>
- Date: Sat, 30 Nov 2013 00:35:28 +0100
On 29 Nov 2013, at 11:19 pm, Graham Cox <email@hidden> wrote:
>> You also have another, damn-quick "hash key" that takes zero disk access to compute: -[NSData length].
>
> Yep, that’s a great idea.
OK, I’ve implemented this much as your suggestion, and I’m also saving the hash object along with the data so I can avoid recomputing it when the file is imported. The huge file I’m testing with now opens in 2/3rds of the time (2 seconds instead of 3). That’s now down from 11 minutes, so overall the optimisations are going quite well :)
—Graham
_______________________________________________
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