• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fast hash of NSData?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Fast hash of NSData?
      • From: Kyle Sluder <email@hidden>
References: 
 >Fast hash of NSData? (From: Graham Cox <email@hidden>)
 >Re: Fast hash of NSData? (From: Kyle Sluder <email@hidden>)
 >Re: Fast hash of NSData? (From: Graham Cox <email@hidden>)
 >Re: Fast hash of NSData? (From: Kyle Sluder <email@hidden>)
 >Re: Fast hash of NSData? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Fast hash of NSData?
  • Next by Date: Re: Fast hash of NSData?
  • Previous by thread: Re: Fast hash of NSData?
  • Next by thread: Re: Fast hash of NSData?
  • Index(es):
    • Date
    • Thread