public
Created

defintion translation speed test

  • Download Gist
gistfile1.php
PHP
1 2 3 4 5 6 7 8 9
$iterations = 10000;
timer_start('test');
for ($i = 0; $i < $iterations; $i++) {
$d = serialize($definitions);
$e = unserialize($d);
}
timer_stop('test');
echo timer_read('test')."ms for $iterations runs. \n";
echo (timer_read('test') / $iterations) ."ms per run";

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.