Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualÁlvaro

Posted 26 November 2012 - 09:13 AM

That trick of only looking at a maximum of 10 characters seems like a cheat to do better at some benchmark, but it's kind of dangerous for a general string hash. Note that IMG_0001.JPG, IMG_0002.JPG etc. will all collide. You may also think of using a hash to check if a file has changed, but that will fail all the time.

I have used CRC32 in the past as a string hash, and it works great. I think it was suggested in "The Art of Computer Programming".

#1Álvaro

Posted 26 November 2012 - 09:11 AM

That trick of only looking at a maximum of 10 characters seems like a cheat to do better at some benchmark, but it's kind of dangerous for a general string hash. Note that IMG_0001.JPG, IMG_0002.JPG etc. will all collide.

PARTNERS