I'd like to know how long each hashing algorithm takes on a particular system given different dataset lengths.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
The PHP.net page for
hash
has some sample code in the comments that demonstrates how you can profile the various PHP hashing functions.Here is one person's recorded times, along with some sample code on how you can replicate the test.
I whipped up this script. I recommend playing with the $random_len value. Differing values produces some interesting results.
See http://us.php.net/manual/en/function.microtime.php. Basically, something like this: