• 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: Steve Bird <email@hidden>
  • Date: Mon, 02 Dec 2013 13:08:00 -0500

On Dec 2, 2013, at 11:58 AM, Jens Alfke <email@hidden> wrote:

>
> On Dec 2, 2013, at 6:36 AM, ChanMaxthon <email@hidden> wrote:
>
>> How about this: treat the data as an array of 64-bit integers (zero-padded) and XOR them together? That will be really fast and you will be able to asm-optimize it.
>
> Did you read the original post? That’s almost exactly what he’s already doing that he wants to improve.
>
>> Or maybe, use some bits and pieces of AES (namely AES-NI instructions) and Merkle-Damgård construction? Since security is no major concern those asm-level constructs can be useful.
>
> Seriously? To quote the last reply I sent, "The OP wants a real-world solution, not an abstract theoretical example”.
>
> And guys, didn’t we answer the question already? And didn’t Graham already say he’d decided on murmurhash? I get the feeling we’re continuing to beat this dead horse into the ground just to show off what we know about combinatorics and crypto [myself included].

Amen. I don’t have anything to show off except an old maxim:  You can’t make a computer run faster, you can only make it do less work.
And the best kind of work is the kind that you don’t have to do.

If the file size is identical
    If the first 8 bytes are identical
        if MurmurHash(file) is identical
             if byte-by-byte comparison is identical
                  IT’S THE SAME IMAGE
             else
                  IT AIN’T
        else
             IT AIN’T
    else
        IT AIN’T
else
    IT AIN’T

There are lots of ways to prove that they are DIFFERENT, and they are fairly quick.
Use them first.


----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com                     (toll free) 1-877-676-8175



_______________________________________________

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


References: 
 >Re: Fast hash of NSData? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Fast hash of NSData? (From: ChanMaxthon <email@hidden>)
 >Re: Fast hash of NSData? (From: Graham Cox <email@hidden>)
 >Re: Fast hash of NSData? (From: ChanMaxthon <email@hidden>)
 >Re: Fast hash of NSData? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Fast hash of NSData?
  • Next by Date: Re: NSShadowAttributeName doesn't scale
  • Previous by thread: Re: Fast hash of NSData?
  • Next by thread: Re: Fast hash of NSData?
  • Index(es):
    • Date
    • Thread