I suggest you ...

compare performance of 2 snippets (across php/hhvm versions)

like possible with performance profiles on blackfire.io it would be great to have a comparison view between 2 snippets

e.g.
http://3v4l.org/SEW7E/perf#tabs
vs
http://3v4l.org/2hdIf/perf#tabs

38 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
maggus.staab shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Tyler Akins commented  ·   ·  Flag as inappropriate

    Wouldn't it be possible to just write or include a timing library in your script so a function is executed for 10 seconds and you get the count?

    $iter = 0;
    $date = time();
    while (time() == $date) {} /// Wait until the time changes
    while (time() < $date + 11) {
    $iter ++;
    my_func();
    }
    echo "Iterations: $iter\n"

Feedback and Knowledge Base