I built a php hashing system and I'm confused with the speed performance of script. I made a benchmark of the script for different amount of requests (the speed is only for the script nothing else involved).
10 requests: 0.001 sec
100 requests: 0.011 sec
1000 requests: 0.073 sec
10000 requests: 0.667 sec
100000 requests: 6.776 sec
After 1 million the server returns blank screen
My confusion:
if 1000 users try to login at the same time will it take 0.00001 sec for each user's password input to be hashed and checked against their original or 0.073sec for each user?
benM this is the script for benchmark:
function test()
{
global $result;
ob_start();
$x = microtime(true);
while($i < 10000)
{
print // here you add whatever you want to test;
++$i;
}
$temp = microtime(true) - $x;
ob_end_clean();
return $temp;
}
echo number_format(test(), 3);