Skip to content

Instantly share code, notes, and snippets.

@fago
Created November 29, 2012 14:25
Show Gist options
  • Save fago/4169427 to your computer and use it in GitHub Desktop.
Save fago/4169427 to your computer and use it in GitHub Desktop.
defintion translation speed test
$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";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment