Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: How to make a fingerprint from an Object

by Dervish (Friar)
on May 08, 2007 at 03:35 UTC ( #614088=note: print w/replies, xml ) Need Help??

in reply to Re: How to make a fingerprint from an Object
in thread How to make a fingerprint from an Object

Of course, you might want to do a bit more data analysis before you just jump into using a hash, since the process of creating the hash will, by definition, take longer than it would to simply examine the two structures once. So whether or not the hash will speed up your code depends on what you want to do with it.

That said, MD5 is a good hashing algorithm. The number of false collisions is small, the algorithm itself is fairly simple (and fast) and if your structure is significantly bigger than the hash key size, the process of comparing many hash keys might be a lot faster than that of comparing many structures. We use it where I work to shortcut the parsing of some multi-megabyte structures, if the user asks to include them many times.

  • Comment on Re^2: How to make a fingerprint from an Object

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://614088]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2023-12-05 21:18 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (29 votes). Check out past polls.