Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^8: hash collision DOS

by demerphq (Chancellor)
on May 08, 2006 at 15:29 UTC ( #548018=note: print w/ replies, xml ) Need Help??


in reply to Re^7: hash collision DOS
in thread hash collision DOS

Its interesting that this thread resurfaced now, as just yesterday I posted a patch to p5p to change the hash function that we use from the "OneAtATime" function to the "SuperFastHash" by Paul Hsieh. Details of both can be found in an updated version of Bob Jenkins hash article from DrDobs. The SFH is signifigantly faster than OneAtATime on modern machines, with SFH running about 3 times as fast as OneAtATime.

Anyway, id be curious if you have any tools or scripts that can be used to do some analysis on how the two functions perform. I plan to instrument a version of perl so I can do chain length histograms and things like that, but anything you might think of would be appreciated.

---
$world=~s/war/peace/g


Comment on Re^8: hash collision DOS
Re^9: hash collision DOS (export)
by tye (Cardinal) on May 08, 2006 at 15:39 UTC

    Can you update your patch to export this function for use by Perl scripts? Several times it has annoyed me that I can't just ask Perl for the integer hash value for some string.

    - tye        

Re^9: hash collision DOS
by tilly (Archbishop) on May 14, 2006 at 17:48 UTC
    I'd suggest benchmarking how fast Perl finishes its test suite. Hashing is so pervasively used within Perl that any significant difference is sure to become obvious.

    Also I'd strongly suggest that you add the ability to add a random seed to the hash, which should be generated by Perl on every run. As this thread explains, that is needed to stop a user DOS attack, which is a potential remote exploit in a web application.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-07-13 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (250 votes), past polls