Created
May 2, 2019 13:25
-
-
Save chajr/e5d8cd3cf52c6d59311a3b682d451182 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/local/opt/[email protected]/bin/php | |
<?php | |
$algList = hash_algos(); | |
foreach ($algList as $alg) { | |
$time = microtime(true); | |
for ($i = 0; $i <= 10000; $i++) { | |
// $hash = hash_file($alg, 'composer.lock'); | |
$hash = hash($alg, 'th thd ghdg h awf aw fgawrg aerg earg esrg esrg esr gse rgse reg serg se se rgse rs '); | |
} | |
$endTime = microtime(true); | |
$diff = $endTime - $time; | |
$hashLen = strlen($hash); | |
echo "$diff - $alg - $hashLen\n"; | |
} | |
//./test | sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment