3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace Lavoiesl\PhpBenchmark; class Profiler { private $start_memory = 0; private $max_memory = 0; private $start_time = null; private $end_time = null; public function start() { $this->start_memory = $this->max_memory = memory_get_usage(true); $this->start_time = microtime(true); register_tick_function( array( $this, "tick" ) ); } public function tick() { $this->max_memory = max($this->max_memory, memory_get_usage(true)); } public function stop() { $this->tick(); $this->end_time = microtime(true); unregister_tick_function( array( $this, "tick" ) ); } function getMemoryUsage() { return $this->max_memory - $this->start_memory; } function getTime() { return $this->end_time - $this->start_time; } } abstract class AbstractTest { /** * @var string */ private $name; private $profiler; public function __construct($name) { $this->name = $name; $this->profiler = new Profiler; } public function getName() { return $this->name; } public function run($n = 1) { $this->prepare(); gc_collect_cycles(); // clear memory before start $this->profiler->start(); for ($i=0; $i < $n; $i++) { // Store the result so it appears in memory profiling $result = $this->execute(); unset($result); } $this->profiler->stop(); $results = array( 'time' => $this->profiler->getTime(), 'memory' => $this->profiler->getMemoryUsage(), 'n' => $n, ); $this->cleanup(); return $results; } protected function prepare() { } abstract protected function execute(); protected function cleanup() { } public function guessCount($max_seconds = 1) { $this->run(); // warmup $once = $this->run(); if ($once['time'] >= $max_seconds) { return 1; } else { return round($max_seconds / $once['time']); } } } class SimpleTest extends AbstractTest { /** * @var \Closure */ private $prepare = null; /** * @var \Closure */ private $execute; /** * @var \Closure */ private $cleanup = null; public function __construct($name, \Closure $execute) { parent::__construct($name); $this->execute = $execute; } public function setPrepare(\Closure $prepare) { $this->prepare = $prepare; return $this; } protected function prepare() { if ($prepare = $this->prepare) { $prepare(); } } protected function execute() { return call_user_func($this->execute); } public function setCleanup(\Closure $cleanup) { $this->cleanup = $cleanup; return $this; } protected function cleanup() { if ($cleanup = $this->cleanup) { $cleanup(); } } } class Benchmark { /** * @var array [Test] */ private $tests = array(); private $n = null; private $base_results; public function addTest(AbstractTest $test) { $this->tests[$test->getName()] = $test; } /** * Utility method to create tests on the fly * You may chain the test: * * @param string $name * @param \Closure $closure function to execute * @return SimpleTest */ public function add($name, \Closure $closure) { $test = new SimpleTest($name, $closure); $this->addTest($test); return $test; } /** * Runs an empty test to determine the benchmark overhead and run each test once */ private function warmup() { $warmup = new SimpleTest('warmup', function(){}); $warmup->run(); foreach ($this->tests as $test) { $test->run(); } $this->base_results = $warmup->run($this->n); } public function run($output = true) { $results = array(); if (null === $this->n) { $this->guessCount(2); // aim for around 2 seconds per test } if ($output) { echo "Running tests {$this->n} times.\n"; } $this->warmup(); $i = 0; foreach ($this->tests as $name => $test) { if ($output) { echo "Testing ".++$i."/".count($this->tests)." : $name\r"; } $results[$name] = $test->run($this->n); } if ($output) { echo "\n\n"; self::outputTable(self::formatResults($results)); } return $results; } public function setCount($n) { $this->n = $n; } /** * Average the guessCount of each test, determining the best n * * @param float $max_seconds * @return int */ public function guessCount($max_seconds) { if (!$this->tests) { throw new \RuntimeException('No test in Benchmark.'); } $n = INF; foreach ($this->tests as $test) { $n = min($n, $test->guessCount($max_seconds)); } return $this->n = Util::round($n); } /** * Output results in columns, padding right if values are string, left if numeric * * @param array $lines array(array('Name' => 'Value')); * @param integer $padding space between columns */ public static function outputTable(array $lines, $padding = 3) { if (!$lines) { return; } $pad = function ($string, $width) use ($padding) { if ($width > 0) { return str_pad($string, $width, " ") . str_repeat(' ' , $padding); } else { return str_pad($string, -$width, " ", STR_PAD_LEFT) . str_repeat(' ' , $padding); } }; // init width with keys' length $cols = array_combine(array_keys($lines[0]), array_map('strlen', array_keys($lines[0]))); foreach ($cols as $col => $width) { foreach ($lines as $line) { $width = max($width, strlen($line[$col])); } // pad left if numeric if (preg_match('/^[0-9]/', $line[$col])) { $width = -$width; } echo $pad($col, $width); $cols[$col] = $width; } echo "\n"; foreach ($lines as $line) { foreach ($cols as $col => $width) { echo $pad($line[$col], $width); } echo "\n"; } } /** * Format the results, rounding numbers, showing difference percentages * and removing a flat time based on the benchmark overhead * * @param array $results array($name => array('time' => 1.0)) * @return array array(array('Test' => $name, 'Time' => '1000 ms', 'Perc' => '100 %')) */ public function formatResults(array $results) { uasort($results, function($a, $b) { if ($a['time'] == $b['time']) return 0; else return ($a['time'] < $b['time']) ? -1 : 1; }); $min_time = INF; $min_memory = INF; foreach ($results as $name => $result) { $time = $result['time']; $time -= $this->base_results['time']; // Substract base_time $time *= 1000; // Convert to ms $time = round($time); $time = max(1, $time); // min 1 ms $min_time = min($min_time, $time); $results[$name]['time'] = $time; $min_memory = min($min_memory, $results[$name]['memory']); } $output = array(); foreach ($results as $name => $result) { $output[] = array( 'Test' => $name, 'Time' => $result['time'] . ' ms', 'Time (%)' => Util::relativePerc($min_time, $result['time']), 'Memory' => Util::convertToSI($result['memory']), 'Memory (%)' => Util::relativePerc($min_memory, $result['memory']), ); } return $output; } } class Util { public static function round($number, $significant = 0) { $order = floor(log($number) / log(10)); return round($number / pow(10, $order), $significant) * pow(10, $order); } /** * Converts 1024 to 1K, etc. * * @param double $number i.e.: 1280 * @param integer $precision i.e.: 1.25 for precision = 2 * @param string $unit suffix of the unit, may be empty * @param integer $factor change base to 1000 or 1024 * @return string i.e.: 1.25 kB */ public static function convertToSI($number, $precision = 2, $unit = 'B', $factor = 1024) { static $sizes = array( '-3' => 'n', '-2' => 'µ', '-1' => 'm', '0' => '', '1' => 'k', '2' => 'M', '3' => 'G', '4' => 'T' ); $scale = $number == 0 ? 0 : floor(log($number, $factor)); return round($number / pow($factor, $scale), $precision) . ' ' . $sizes[$scale] . $unit = 'B'; } public static function relativePerc($min, $value) { if ($min == 0 || $min == $value) { return ''; } else { return round(($value - $min) / $min * 100) . ' %'; } } } $benchmark = new Benchmark; function multiexplode ($delimiters,$string) { $ready = str_replace($delimiters, $delimiters[0], $string); $launch = explode($delimiters[0], $ready); return $launch; } function homemadeexplode($splitter, $str) { $return = []; if (is_array($splitter) == true) { foreach ($splitter as $sp) { $str = homemadeexplode($sp, $str); } $return = $str; } else { if (is_array($str) == true) { foreach ($str as $st) { $tmp = explode($splitter, $st); $return = array_merge($return, $tmp); } } else { $return = explode($splitter, $str); } } return $return; } $text = "あいうえ おか き くけこさしす: せそたち つてとな, にぬね のはひふ へほまみ むめ もやゆよらりるれ. ろわおん あいうえ | this one too :)"; $benchmark->add('multiexplode', function() use($text) { return multiexplode( [",",".","|",":"], $text); }); $benchmark->add('homemadeExplode', function() use($text) { return homemadeexplode([",",".","|",":"], $text); }); $benchmark->add('preg_split', function() use($text) { return preg_split( '/[,.|:]/', $text); }); $benchmark->add('mb_split', function() use($text) { return mb_split( '[,.|:]', $text); }); $benchmark->setCount(50000); $benchmark->run();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  (null)
number of ops:  34
compiled vars:  !0 = $benchmark, !1 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  420     0  E >   NEW                                                  $2      'Lavoiesl%5CPhpBenchmark%5CBenchmark'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
  451     3        ASSIGN                                                       !1, '%E3%81%82%E3%81%84%E3%81%86%E3%81%88+%E3%81%8A%E3%81%8B+%E3%81%8D+%E3%81%8F%E3%81%91%E3%81%93%E3%81%95%E3%81%97%E3%81%99%3A+%E3%81%9B%E3%81%9D%E3%81%9F%E3%81%A1+%E3%81%A4%E3%81%A6%E3%81%A8%E3%81%AA%2C+%E3%81%AB%E3%81%AC%E3%81%AD+%E3%81%AE%E3%81%AF%E3%81%B2%E3%81%B5+%E3%81%B8%E3%81%BB%E3%81%BE%E3%81%BF+%E3%82%80%E3%82%81+%E3%82%82%E3%82%84%E3%82%86%E3%82%88%E3%82%89%E3%82%8A%E3%82%8B%E3%82%8C.+%E3%82%8D%E3%82%8F%E3%81%8A%E3%82%93+%E3%81%82%E3%81%84%E3%81%86%E3%81%88+%7C+this+one+too+%3A%29'
  453     4        INIT_METHOD_CALL                                             !0, 'add'
          5        SEND_VAL_EX                                                  'multiexplode'
          6        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          7        BIND_LEXICAL                                                 ~6, !1
          8        SEND_VAL_EX                                                  ~6
          9        DO_FCALL                                          0          
  454    10        INIT_METHOD_CALL                                             !0, 'add'
         11        SEND_VAL_EX                                                  'homemadeExplode'
         12        DECLARE_LAMBDA_FUNCTION                              ~8      [1]
         13        BIND_LEXICAL                                                 ~8, !1
         14        SEND_VAL_EX                                                  ~8
         15        DO_FCALL                                          0          
  455    16        INIT_METHOD_CALL                                             !0, 'add'
         17        SEND_VAL_EX                                                  'preg_split'
         18        DECLARE_LAMBDA_FUNCTION                              ~10     [2]
         19        BIND_LEXICAL                                                 ~10, !1
         20        SEND_VAL_EX                                                  ~10
         21        DO_FCALL                                          0          
  456    22        INIT_METHOD_CALL                                             !0, 'add'
         23        SEND_VAL_EX                                                  'mb_split'
         24        DECLARE_LAMBDA_FUNCTION                              ~12     [3]
         25        BIND_LEXICAL                                                 ~12, !1
         26        SEND_VAL_EX                                                  ~12
         27        DO_FCALL                                          0          
  458    28        INIT_METHOD_CALL                                             !0, 'setCount'
         29        SEND_VAL_EX                                                  50000
         30        DO_FCALL                                          0          
  459    31        INIT_METHOD_CALL                                             !0, 'run'
         32        DO_FCALL                                          0          
         33      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  {closure:/in/4Cec9:453}
number of ops:  7
compiled vars:  !0 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  453     0  E >   BIND_STATIC                                                  !0
          1        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmultiexplode'
          2        SEND_VAL_EX                                                  <array>
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0  $1      
          5      > RETURN                                                       $1
          6*     > RETURN                                                       null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  {closure:/in/4Cec9:454}
number of ops:  7
compiled vars:  !0 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  454     0  E >   BIND_STATIC                                                  !0
          1        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Chomemadeexplode'
          2        SEND_VAL_EX                                                  <array>
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0  $1      
          5      > RETURN                                                       $1
          6*     > RETURN                                                       null

End of Dynamic Function 1

Dynamic Function 2
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  {closure:/in/4Cec9:455}
number of ops:  7
compiled vars:  !0 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  455     0  E >   BIND_STATIC                                                  !0
          1        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cpreg_split'
          2        SEND_VAL_EX                                                  '%2F%5B%2C.%7C%3A%5D%2F'
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0  $1      
          5      > RETURN                                                       $1
          6*     > RETURN                                                       null

End of Dynamic Function 2

Dynamic Function 3
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  {closure:/in/4Cec9:456}
number of ops:  7
compiled vars:  !0 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  456     0  E >   BIND_STATIC                                                  !0
          1        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmb_split'
          2        SEND_VAL_EX                                                  '%5B%2C.%7C%3A%5D'
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0  $1      
          5      > RETURN                                                       $1
          6*     > RETURN                                                       null

End of Dynamic Function 3

Function lavoiesl%5Cphpbenchmark%5Cmultiexplode:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 208) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  Lavoiesl\PhpBenchmark\multiexplode
number of ops:  24
compiled vars:  !0 = $delimiters, !1 = $string, !2 = $ready, !3 = $launch
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  422     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
  424     2      > JMP_FRAMELESS                                   s8           'lavoiesl%5Cphpbenchmark%5Cstr_replace', ->11
          3    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cstr_replace'
          4        SEND_VAR_EX                                                  !0
          5        CHECK_FUNC_ARG                                               
          6        FETCH_DIM_FUNC_ARG                                   $4      !0, 0
          7        SEND_FUNC_ARG                                                $4
          8        SEND_VAR_EX                                                  !1
          9        DO_FCALL                                          0  $5      
         10      > JMP                                                          ->14
         11    >   FETCH_DIM_R                                          ~6      !0, 0
         12        FRAMELESS_ICALL_3                str_replace         $5      !0, ~6
         13        OP_DATA                                                      !1
         14    >   ASSIGN                                                       !2, $5
  425    15        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cexplode'
         16        CHECK_FUNC_ARG                                               
         17        FETCH_DIM_FUNC_ARG                                   $8      !0, 0
         18        SEND_FUNC_ARG                                                $8
         19        SEND_VAR_EX                                                  !2
         20        DO_FCALL                                          0  $9      
         21        ASSIGN                                                       !3, $9
  426    22      > RETURN                                                       !3
  427    23*     > RETURN                                                       null

End of function lavoiesl%5Cphpbenchmark%5Cmultiexplode

Function lavoiesl%5Cphpbenchmark%5Chomemadeexplode:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 19
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 39
Branch analysis from position: 24
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 37
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 37
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 37
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  Lavoiesl\PhpBenchmark\homemadeexplode
number of ops:  46
compiled vars:  !0 = $splitter, !1 = $str, !2 = $return, !3 = $sp, !4 = $st, !5 = $tmp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  429     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
  431     2        ASSIGN                                                       !2, <array>
  432     3        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cis_array'
          4        SEND_VAR_EX                                                  !0
          5        DO_FCALL                                          0  $7      
          6        IS_EQUAL                                                     $7, <true>
          7      > JMPZ                                                         ~8, ->19
  433     8    > > FE_RESET_R                                           $9      !0, ->16
          9    > > FE_FETCH_R                                                   $9, !3, ->16
  434    10    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Chomemadeexplode'
         11        SEND_VAR_EX                                                  !3
         12        SEND_VAR_EX                                                  !1
         13        DO_FCALL                                          0  $10     
         14        ASSIGN                                                       !1, $10
  433    15      > JMP                                                          ->9
         16    >   FE_FREE                                                      $9
  436    17        ASSIGN                                                       !2, !1
  432    18      > JMP                                                          ->44
  438    19    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cis_array'
         20        SEND_VAR_EX                                                  !1
         21        DO_FCALL                                          0  $13     
         22        IS_EQUAL                                                     $13, <true>
         23      > JMPZ                                                         ~14, ->39
  439    24    > > FE_RESET_R                                           $15     !1, ->37
         25    > > FE_FETCH_R                                                   $15, !4, ->37
  440    26    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cexplode'
         27        SEND_VAR_EX                                                  !0
         28        SEND_VAR_EX                                                  !4
         29        DO_FCALL                                          0  $16     
         30        ASSIGN                                                       !5, $16
  441    31        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Carray_merge'
         32        SEND_VAR_EX                                                  !2
         33        SEND_VAR_EX                                                  !5
         34        DO_FCALL                                          0  $18     
         35        ASSIGN                                                       !2, $18
  439    36      > JMP                                                          ->25
         37    >   FE_FREE                                                      $15
  438    38      > JMP                                                          ->44
  444    39    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cexplode'
         40        SEND_VAR_EX                                                  !0
         41        SEND_VAR_EX                                                  !1
         42        DO_FCALL                                          0  $20     
         43        ASSIGN                                                       !2, $20
  447    44    > > RETURN                                                       !2
  448    45*     > RETURN                                                       null

End of function lavoiesl%5Cphpbenchmark%5Chomemadeexplode

Class Lavoiesl\PhpBenchmark\Profiler:
Function start:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  start
number of ops:  19
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmemory_get_usage'
          1        SEND_VAL_EX                                                  <true>
          2        DO_FCALL                                          0  $2      
          3        ASSIGN_OBJ                                           ~1      'max_memory'
          4        OP_DATA                                                      $2
          5        ASSIGN_OBJ                                                   'start_memory'
          6        OP_DATA                                                      ~1
   18     7        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmicrotime'
          8        SEND_VAL_EX                                                  <true>
          9        DO_FCALL                                          0  $4      
         10        ASSIGN_OBJ                                                   'start_time'
         11        OP_DATA                                                      $4
   20    12        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cregister_tick_function'
         13        FETCH_THIS                                           ~5      
         14        INIT_ARRAY                                           ~6      ~5
         15        ADD_ARRAY_ELEMENT                                    ~6      'tick'
         16        SEND_VAL_EX                                                  ~6
         17        DO_FCALL                                          0          
   21    18      > RETURN                                                       null

End of function start

Function tick:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 208) Position 1 = 1, Position 2 = 11
Branch analysis from position: 1
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  tick
number of ops:  19
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   25     0  E > > JMP_FRAMELESS                                   s96          'lavoiesl%5Cphpbenchmark%5Cmax', ->11
          1    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmax'
          2        CHECK_FUNC_ARG                                               
          3        FETCH_OBJ_FUNC_ARG                                   $1      'max_memory'
          4        SEND_FUNC_ARG                                                $1
          5        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmemory_get_usage'
          6        SEND_VAL_EX                                                  <true>
          7        DO_FCALL                                          0  $2      
          8        SEND_VAR_NO_REF_EX                                           $2
          9        DO_FCALL                                          0  $3      
         10      > JMP                                                          ->16
         11    >   FETCH_OBJ_R                                          ~4      'max_memory'
         12        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmemory_get_usage'
         13        SEND_VAL_EX                                                  <true>
         14        DO_FCALL                                          0  $5      
         15        FRAMELESS_ICALL_2                max                 $3      ~4, $5
         16    >   ASSIGN_OBJ                                                   'max_memory'
         17        OP_DATA                                                      $3
   26    18      > RETURN                                                       null

End of function tick

Function stop:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  stop
number of ops:  14
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   30     0  E >   INIT_METHOD_CALL                                             'tick'
          1        DO_FCALL                                          0          
   31     2        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmicrotime'
          3        SEND_VAL_EX                                                  <true>
          4        DO_FCALL                                          0  $2      
          5        ASSIGN_OBJ                                                   'end_time'
          6        OP_DATA                                                      $2
   33     7        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cunregister_tick_function'
          8        FETCH_THIS                                           ~3      
          9        INIT_ARRAY                                           ~4      ~3
         10        ADD_ARRAY_ELEMENT                                    ~4      'tick'
         11        SEND_VAL_EX                                                  ~4
         12        DO_FCALL                                          0          
   34    13      > RETURN                                                       null

End of function stop

Function getmemoryusage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  getMemoryUsage
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   38     0  E >   FETCH_OBJ_R                                          ~0      'max_memory'
          1        FETCH_OBJ_R                                          ~1      'start_memory'
          2        SUB                                                  ~2      ~0, ~1
          3      > RETURN                                                       ~2
   39     4*     > RETURN                                                       null

End of function getmemoryusage

Function gettime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  getTime
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   43     0  E >   FETCH_OBJ_R                                          ~0      'end_time'
          1        FETCH_OBJ_R                                          ~1      'start_time'
          2        SUB                                                  ~2      ~0, ~1
          3      > RETURN                                                       ~2
   44     4*     > RETURN                                                       null

End of function gettime

End of class Lavoiesl\PhpBenchmark\Profiler.

Class Lavoiesl\PhpBenchmark\AbstractTest:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  __construct
number of ops:  8
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   57     0  E >   RECV                                                 !0      
   59     1        ASSIGN_OBJ                                                   'name'
          2        OP_DATA                                                      !0
   60     3        NEW                                                  $3      'Lavoiesl%5CPhpBenchmark%5CProfiler'
          4        DO_FCALL                                          0          
          5        ASSIGN_OBJ                                                   'profiler'
          6        OP_DATA                                                      $3
   61     7      > RETURN                                                       null

End of function __construct

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   65     0  E >   FETCH_OBJ_R                                          ~0      'name'
          1      > RETURN                                                       ~0
   66     2*     > RETURN                                                       null

End of function getname

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
Branch analysis from position: 10
filename:       /in/4Cec9
function name:  run
number of ops:  34
compiled vars:  !0 = $n, !1 = $i, !2 = $result, !3 = $results
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   68     0  E >   RECV_INIT                                            !0      1
   70     1        INIT_METHOD_CALL                                             'prepare'
          2        DO_FCALL                                          0          
   72     3        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cgc_collect_cycles'
          4        DO_FCALL                                          0          
   74     5        FETCH_OBJ_R                                          ~6      'profiler'
          6        INIT_METHOD_CALL                                             ~6, 'start'
          7        DO_FCALL                                          0          
   76     8        ASSIGN                                                       !1, 0
          9      > JMP                                                          ->15
   78    10    >   INIT_METHOD_CALL                                             'execute'
         11        DO_FCALL                                          0  $9      
         12        ASSIGN                                                       !2, $9
   79    13        UNSET_CV                                                     !2
   76    14        PRE_INC                                                      !1
         15    >   IS_SMALLER                                                   !1, !0
         16      > JMPNZ                                                        ~12, ->10
   82    17    >   FETCH_OBJ_R                                          ~13     'profiler'
         18        INIT_METHOD_CALL                                             ~13, 'stop'
         19        DO_FCALL                                          0          
   85    20        FETCH_OBJ_R                                          ~15     'profiler'
         21        INIT_METHOD_CALL                                             ~15, 'getTime'
         22        DO_FCALL                                          0  $16     
         23        INIT_ARRAY                                           ~17     $16, 'time'
   86    24        FETCH_OBJ_R                                          ~18     'profiler'
         25        INIT_METHOD_CALL                                             ~18, 'getMemoryUsage'
         26        DO_FCALL                                          0  $19     
         27        ADD_ARRAY_ELEMENT                                    ~17     $19, 'memory'
   87    28        ADD_ARRAY_ELEMENT                                    ~17     !0, 'n'
   84    29        ASSIGN                                                       !3, ~17
   90    30        INIT_METHOD_CALL                                             'cleanup'
         31        DO_FCALL                                          0          
   92    32      > RETURN                                                       !3
   93    33*     > RETURN                                                       null

End of function run

Function prepare:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  prepare
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   97     0  E > > RETURN                                                       null

End of function prepare

Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  execute
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   99     0  E > > RETURN                                                       null

End of function execute

Function cleanup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  cleanup
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  103     0  E > > RETURN                                                       null

End of function cleanup

Function guesscount:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  guessCount
number of ops:  18
compiled vars:  !0 = $max_seconds, !1 = $once
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  105     0  E >   RECV_INIT                                            !0      1
  107     1        INIT_METHOD_CALL                                             'run'
          2        DO_FCALL                                          0          
  108     3        INIT_METHOD_CALL                                             'run'
          4        DO_FCALL                                          0  $3      
          5        ASSIGN                                                       !1, $3
  110     6        FETCH_DIM_R                                          ~5      !1, 'time'
          7        IS_SMALLER_OR_EQUAL                                          !0, ~5
          8      > JMPZ                                                         ~6, ->11
  111     9    > > RETURN                                                       1
  110    10*       JMP                                                          ->17
  113    11    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cround'
         12        FETCH_DIM_R                                          ~7      !1, 'time'
         13        DIV                                                  ~8      !0, ~7
         14        SEND_VAL_EX                                                  ~8
         15        DO_FCALL                                          0  $9      
         16      > RETURN                                                       $9
  115    17*     > RETURN                                                       null

End of function guesscount

End of class Lavoiesl\PhpBenchmark\AbstractTest.

Class Lavoiesl\PhpBenchmark\SimpleTest:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  __construct
number of ops:  8
compiled vars:  !0 = $name, !1 = $execute
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  136     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
  138     2        INIT_STATIC_METHOD_CALL                                      
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0          
  140     5        ASSIGN_OBJ                                                   'execute'
          6        OP_DATA                                                      !1
  141     7      > RETURN                                                       null

End of function __construct

Function setprepare:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  setPrepare
number of ops:  6
compiled vars:  !0 = $prepare
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  143     0  E >   RECV                                                 !0      
  145     1        ASSIGN_OBJ                                                   'prepare'
          2        OP_DATA                                                      !0
  147     3        FETCH_THIS                                           ~2      
          4      > RETURN                                                       ~2
  148     5*     > RETURN                                                       null

End of function setprepare

Function prepare:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/4Cec9
function name:  prepare
number of ops:  6
compiled vars:  !0 = $prepare
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  152     0  E >   FETCH_OBJ_R                                          ~1      'prepare'
          1        ASSIGN                                               ~2      !0, ~1
          2      > JMPZ                                                         ~2, ->5
  153     3    >   INIT_DYNAMIC_CALL                                            !0
          4        DO_FCALL                                          0          
  155     5    > > RETURN                                                       null

End of function prepare

Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  execute
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  159     0  E >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Ccall_user_func'
          1        CHECK_FUNC_ARG                                               
          2        FETCH_OBJ_FUNC_ARG                                   $0      'execute'
          3        SEND_FUNC_ARG                                                $0
          4        DO_FCALL                                          0  $1      
          5      > RETURN                                                       $1
  160     6*     > RETURN                                                       null

End of function execute

Function setcleanup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  setCleanup
number of ops:  6
compiled vars:  !0 = $cleanup
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  163     0  E >   RECV                                                 !0      
  165     1        ASSIGN_OBJ                                                   'cleanup'
          2        OP_DATA                                                      !0
  167     3        FETCH_THIS                                           ~2      
          4      > RETURN                                                       ~2
  168     5*     > RETURN                                                       null

End of function setcleanup

Function cleanup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/4Cec9
function name:  cleanup
number of ops:  6
compiled vars:  !0 = $cleanup
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  172     0  E >   FETCH_OBJ_R                                          ~1      'cleanup'
          1        ASSIGN                                               ~2      !0, ~1
          2      > JMPZ                                                         ~2, ->5
  173     3    >   INIT_DYNAMIC_CALL                                            !0
          4        DO_FCALL                                          0          
  175     5    > > RETURN                                                       null

End of function cleanup

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   65     0  E >   FETCH_OBJ_R                                          ~0      'name'
          1      > RETURN                                                       ~0
   66     2*     > RETURN                                                       null

End of function getname

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
Branch analysis from position: 10
filename:       /in/4Cec9
function name:  run
number of ops:  34
compiled vars:  !0 = $n, !1 = $i, !2 = $result, !3 = $results
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   68     0  E >   RECV_INIT                                            !0      1
   70     1        INIT_METHOD_CALL                                             'prepare'
          2        DO_FCALL                                          0          
   72     3        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cgc_collect_cycles'
          4        DO_FCALL                                          0          
   74     5        FETCH_OBJ_R                                          ~6      'profiler'
          6        INIT_METHOD_CALL                                             ~6, 'start'
          7        DO_FCALL                                          0          
   76     8        ASSIGN                                                       !1, 0
          9      > JMP                                                          ->15
   78    10    >   INIT_METHOD_CALL                                             'execute'
         11        DO_FCALL                                          0  $9      
         12        ASSIGN                                                       !2, $9
   79    13        UNSET_CV                                                     !2
   76    14        PRE_INC                                                      !1
         15    >   IS_SMALLER                                                   !1, !0
         16      > JMPNZ                                                        ~12, ->10
   82    17    >   FETCH_OBJ_R                                          ~13     'profiler'
         18        INIT_METHOD_CALL                                             ~13, 'stop'
         19        DO_FCALL                                          0          
   85    20        FETCH_OBJ_R                                          ~15     'profiler'
         21        INIT_METHOD_CALL                                             ~15, 'getTime'
         22        DO_FCALL                                          0  $16     
         23        INIT_ARRAY                                           ~17     $16, 'time'
   86    24        FETCH_OBJ_R                                          ~18     'profiler'
         25        INIT_METHOD_CALL                                             ~18, 'getMemoryUsage'
         26        DO_FCALL                                          0  $19     
         27        ADD_ARRAY_ELEMENT                                    ~17     $19, 'memory'
   87    28        ADD_ARRAY_ELEMENT                                    ~17     !0, 'n'
   84    29        ASSIGN                                                       !3, ~17
   90    30        INIT_METHOD_CALL                                             'cleanup'
         31        DO_FCALL                                          0          
   92    32      > RETURN                                                       !3
   93    33*     > RETURN                                                       null

End of function run

Function guesscount:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  guessCount
number of ops:  18
compiled vars:  !0 = $max_seconds, !1 = $once
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  105     0  E >   RECV_INIT                                            !0      1
  107     1        INIT_METHOD_CALL                                             'run'
          2        DO_FCALL                                          0          
  108     3        INIT_METHOD_CALL                                             'run'
          4        DO_FCALL                                          0  $3      
          5        ASSIGN                                                       !1, $3
  110     6        FETCH_DIM_R                                          ~5      !1, 'time'
          7        IS_SMALLER_OR_EQUAL                                          !0, ~5
          8      > JMPZ                                                         ~6, ->11
  111     9    > > RETURN                                                       1
  110    10*       JMP                                                          ->17
  113    11    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cround'
         12        FETCH_DIM_R                                          ~7      !1, 'time'
         13        DIV                                                  ~8      !0, ~7
         14        SEND_VAL_EX                                                  ~8
         15        DO_FCALL                                          0  $9      
         16      > RETURN                                                       $9
  115    17*     > RETURN                                                       null

End of function guesscount

End of class Lavoiesl\PhpBenchmark\SimpleTest.

Class Lavoiesl\PhpBenchmark\Benchmark:
Function addtest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  addTest
number of ops:  7
compiled vars:  !0 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  189     0  E >   RECV                                                 !0      
  191     1        INIT_METHOD_CALL                                             !0, 'getName'
          2        DO_FCALL                                          0  $2      
          3        FETCH_OBJ_W                                          $1      'tests'
          4        ASSIGN_DIM                                                   $1, $2
          5        OP_DATA                                                      !0
  192     6      > RETURN                                                       null

End of function addtest

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  add
number of ops:  12
compiled vars:  !0 = $name, !1 = $closure, !2 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  202     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
  204     2        NEW                                                  $3      'Lavoiesl%5CPhpBenchmark%5CSimpleTest'
          3        SEND_VAR_EX                                                  !0
          4        SEND_VAR_EX                                                  !1
          5        DO_FCALL                                          0          
          6        ASSIGN                                                       !2, $3
  205     7        INIT_METHOD_CALL                                             'addTest'
          8        SEND_VAR_EX                                                  !2
          9        DO_FCALL                                          0          
  207    10      > RETURN                                                       !2
  208    11*     > RETURN                                                       null

End of function add

Function warmup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/4Cec9
function name:  warmup
number of ops:  23
compiled vars:  !0 = $warmup, !1 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  215     0  E >   NEW                                                  $2      'Lavoiesl%5CPhpBenchmark%5CSimpleTest'
          1        SEND_VAL_EX                                                  'warmup'
          2        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          3        SEND_VAL_EX                                                  ~3
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !0, $2
  216     6        INIT_METHOD_CALL                                             !0, 'run'
          7        DO_FCALL                                          0          
  218     8        FETCH_OBJ_R                                          ~7      'tests'
          9      > FE_RESET_R                                           $8      ~7, ->14
         10    > > FE_FETCH_R                                                   $8, !1, ->14
  219    11    >   INIT_METHOD_CALL                                             !1, 'run'
         12        DO_FCALL                                          0          
  218    13      > JMP                                                          ->10
         14    >   FE_FREE                                                      $8
  222    15        INIT_METHOD_CALL                                             !0, 'run'
         16        CHECK_FUNC_ARG                                               
         17        FETCH_OBJ_FUNC_ARG                                   $11     'n'
         18        SEND_FUNC_ARG                                                $11
         19        DO_FCALL                                          0  $12     
         20        ASSIGN_OBJ                                                   'base_results'
         21        OP_DATA                                                      $12
  223    22      > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  {closure:Lavoiesl\PhpBenchmark\Benchmark::warmup():215}
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  215     0  E > > RETURN                                                       null

End of Dynamic Function 0

End of function warmup

Function run:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 44
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 44
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 36
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 36
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 53
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
Branch analysis from position: 44
Branch analysis from position: 14
Branch analysis from position: 8
filename:       /in/4Cec9
function name:  run
number of ops:  55
compiled vars:  !0 = $output, !1 = $results, !2 = $i, !3 = $test, !4 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  225     0  E >   RECV_INIT                                            !0      <true>
  227     1        ASSIGN                                                       !1, <array>
  229     2        FETCH_OBJ_R                                          ~6      'n'
          3        TYPE_CHECK                                        2          ~6
          4      > JMPZ                                                         ~7, ->8
  230     5    >   INIT_METHOD_CALL                                             'guessCount'
          6        SEND_VAL_EX                                                  2
          7        DO_FCALL                                          0          
  233     8    > > JMPZ                                                         !0, ->14
  234     9    >   ROPE_INIT                                         3  ~11     'Running+tests+'
         10        FETCH_OBJ_R                                          ~9      'n'
         11        ROPE_ADD                                          1  ~11     ~11, ~9
         12        ROPE_END                                          2  ~10     ~11, '+times.%0A'
         13        ECHO                                                         ~10
  237    14    >   INIT_METHOD_CALL                                             'warmup'
         15        DO_FCALL                                          0          
  239    16        ASSIGN                                                       !2, 0
  240    17        FETCH_OBJ_R                                          ~15     'tests'
         18      > FE_RESET_R                                           $16     ~15, ->44
         19    > > FE_FETCH_R                                           ~17     $16, !3, ->44
         20    >   ASSIGN                                                       !4, ~17
  241    21      > JMPZ                                                         !0, ->36
  242    22    >   PRE_INC                                              ~19     !2
         23        CONCAT                                               ~20     'Testing+', ~19
         24        CONCAT                                               ~21     ~20, '%2F'
         25        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Ccount'
         26        CHECK_FUNC_ARG                                               
         27        FETCH_OBJ_FUNC_ARG                                   $22     'tests'
         28        SEND_FUNC_ARG                                                $22
         29        DO_FCALL                                          0  $23     
         30        CONCAT                                               ~24     ~21, $23
         31        ROPE_INIT                                         3  ~26     '+%3A+'
         32        ROPE_ADD                                          1  ~26     ~26, !4
         33        ROPE_END                                          2  ~25     ~26, '%0D'
         34        CONCAT                                               ~28     ~24, ~25
         35        ECHO                                                         ~28
  244    36    >   INIT_METHOD_CALL                                             !3, 'run'
         37        CHECK_FUNC_ARG                                               
         38        FETCH_OBJ_FUNC_ARG                                   $30     'n'
         39        SEND_FUNC_ARG                                                $30
         40        DO_FCALL                                          0  $31     
         41        ASSIGN_DIM                                                   !1, !4
         42        OP_DATA                                                      $31
  240    43      > JMP                                                          ->19
         44    >   FE_FREE                                                      $16
  247    45      > JMPZ                                                         !0, ->53
  248    46    >   ECHO                                                         '%0A%0A'
  249    47        INIT_STATIC_METHOD_CALL                                      'outputTable'
         48        INIT_STATIC_METHOD_CALL                                      'formatResults'
         49        SEND_VAR_EX                                                  !1
         50        DO_FCALL                                          0  $32     
         51        SEND_VAR_NO_REF_EX                                           $32
         52        DO_FCALL                                          0          
  252    53    > > RETURN                                                       !1
  253    54*     > RETURN                                                       null

End of function run

Function setcount:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  setCount
number of ops:  4
compiled vars:  !0 = $n
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  255     0  E >   RECV                                                 !0      
  257     1        ASSIGN_OBJ                                                   'n'
          2        OP_DATA                                                      !0
  258     3      > RETURN                                                       null

End of function setcount

Function guesscount:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 28
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 28
Branch analysis from position: 13
2 jumps found. (Code = 208) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/4Cec9
function name:  guessCount
number of ops:  36
compiled vars:  !0 = $max_seconds, !1 = $n, !2 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  266     0  E >   RECV                                                 !0      
  268     1        FETCH_OBJ_R                                          ~3      'tests'
          2        BOOL_NOT                                             ~4      ~3
          3      > JMPZ                                                         ~4, ->8
  269     4    >   NEW                                                  $5      'RuntimeException'
          5        SEND_VAL_EX                                                  'No+test+in+Benchmark.'
          6        DO_FCALL                                          0          
          7      > THROW                                             0          $5
  272     8    >   FETCH_CONSTANT                                       ~7      'Lavoiesl%5CPhpBenchmark%5CINF'
          9        ASSIGN                                                       !1, ~7
  274    10        FETCH_OBJ_R                                          ~9      'tests'
         11      > FE_RESET_R                                           $10     ~9, ->28
         12    > > FE_FETCH_R                                                   $10, !2, ->28
  275    13    > > JMP_FRAMELESS                                   s104         'lavoiesl%5Cphpbenchmark%5Cmin', ->22
         14    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmin'
         15        SEND_VAR_EX                                                  !1
         16        INIT_METHOD_CALL                                             !2, 'guessCount'
         17        SEND_VAR_EX                                                  !0
         18        DO_FCALL                                          0  $11     
         19        SEND_VAR_NO_REF_EX                                           $11
         20        DO_FCALL                                          0  $12     
         21      > JMP                                                          ->26
         22    >   INIT_METHOD_CALL                                             !2, 'guessCount'
         23        SEND_VAR_EX                                                  !0
         24        DO_FCALL                                          0  $13     
         25        FRAMELESS_ICALL_2                min                 $12     !1, $13
         26    >   ASSIGN                                                       !1, $12
  274    27      > JMP                                                          ->12
         28    >   FE_FREE                                                      $10
  278    29        INIT_STATIC_METHOD_CALL                                      'Lavoiesl%5CPhpBenchmark%5CUtil', 'round'
         30        SEND_VAR_EX                                                  !1
         31        DO_FCALL                                          0  $16     
         32        ASSIGN_OBJ                                           ~15     'n'
         33        OP_DATA                                                      $16
         34      > RETURN                                                       ~15
  279    35*     > RETURN                                                       null

End of function guesscount

Function outputtable:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 73
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 73
Branch analysis from position: 29
2 jumps found. (Code = 77) Position 1 = 31, Position 2 = 51
Branch analysis from position: 31
2 jumps found. (Code = 78) Position 1 = 32, Position 2 = 51
Branch analysis from position: 32
2 jumps found. (Code = 208) Position 1 = 33, Position 2 = 43
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 51
2 jumps found. (Code = 208) Position 1 = 53, Position 2 = 60
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
2 jumps found. (Code = 43) Position 1 = 63, Position 2 = 65
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 65
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 63, Position 2 = 65
Branch analysis from position: 63
Branch analysis from position: 65
Branch analysis from position: 51
Branch analysis from position: 73
2 jumps found. (Code = 77) Position 1 = 76, Position 2 = 91
Branch analysis from position: 76
2 jumps found. (Code = 78) Position 1 = 77, Position 2 = 91
Branch analysis from position: 77
2 jumps found. (Code = 77) Position 1 = 78, Position 2 = 88
Branch analysis from position: 78
2 jumps found. (Code = 78) Position 1 = 79, Position 2 = 88
Branch analysis from position: 79
1 jumps found. (Code = 42) Position 1 = 78
Branch analysis from position: 78
Branch analysis from position: 88
1 jumps found. (Code = 42) Position 1 = 76
Branch analysis from position: 76
Branch analysis from position: 88
Branch analysis from position: 91
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 91
Branch analysis from position: 73
filename:       /in/4Cec9
function name:  outputTable
number of ops:  93
compiled vars:  !0 = $lines, !1 = $padding, !2 = $pad, !3 = $cols, !4 = $width, !5 = $col, !6 = $line
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  287     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      3
  289     2        BOOL_NOT                                             ~7      !0
          3      > JMPZ                                                         ~7, ->5
  290     4    > > RETURN                                                       null
  293     5    >   DECLARE_LAMBDA_FUNCTION                              ~8      [0]
          6        BIND_LEXICAL                                                 ~8, !1
          7        ASSIGN                                                       !2, ~8
  302     8        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Carray_combine'
          9        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Carray_keys'
         10        CHECK_FUNC_ARG                                               
         11        FETCH_DIM_FUNC_ARG                                   $10     !0, 0
         12        SEND_FUNC_ARG                                                $10
         13        DO_FCALL                                          0  $11     
         14        SEND_VAR_NO_REF_EX                                           $11
         15        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Carray_map'
         16        SEND_VAL_EX                                                  'strlen'
         17        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Carray_keys'
         18        CHECK_FUNC_ARG                                               
         19        FETCH_DIM_FUNC_ARG                                   $12     !0, 0
         20        SEND_FUNC_ARG                                                $12
         21        DO_FCALL                                          0  $13     
         22        SEND_VAR_NO_REF_EX                                           $13
         23        DO_FCALL                                          0  $14     
         24        SEND_VAR_NO_REF_EX                                           $14
         25        DO_FCALL                                          0  $15     
         26        ASSIGN                                                       !3, $15
  304    27      > FE_RESET_R                                           $17     !3, ->73
         28    > > FE_FETCH_R                                           ~18     $17, !4, ->73
         29    >   ASSIGN                                                       !5, ~18
  305    30      > FE_RESET_R                                           $20     !0, ->51
         31    > > FE_FETCH_R                                                   $20, !6, ->51
  306    32    > > JMP_FRAMELESS                                   s56          'lavoiesl%5Cphpbenchmark%5Cmax', ->43
         33    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmax'
         34        SEND_VAR_EX                                                  !4
         35        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cstrlen'
         36        CHECK_FUNC_ARG                                               
         37        FETCH_DIM_FUNC_ARG                                   $21     !6, !5
         38        SEND_FUNC_ARG                                                $21
         39        DO_FCALL                                          0  $22     
         40        SEND_VAR_NO_REF_EX                                           $22
         41        DO_FCALL                                          0  $23     
         42      > JMP                                                          ->49
         43    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cstrlen'
         44        CHECK_FUNC_ARG                                               
         45        FETCH_DIM_FUNC_ARG                                   $24     !6, !5
         46        SEND_FUNC_ARG                                                $24
         47        DO_FCALL                                          0  $25     
         48        FRAMELESS_ICALL_2                max                 $23     !4, $25
         49    >   ASSIGN                                                       !4, $23
  305    50      > JMP                                                          ->31
         51    >   FE_FREE                                                      $20
  310    52      > JMP_FRAMELESS                                   s72          'lavoiesl%5Cphpbenchmark%5Cpreg_match', ->60
         53    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cpreg_match'
         54        SEND_VAL_EX                                                  '%2F%5E%5B0-9%5D%2F'
         55        CHECK_FUNC_ARG                                               
         56        FETCH_DIM_FUNC_ARG                                   $27     !6, !5
         57        SEND_FUNC_ARG                                                $27
         58        DO_FCALL                                          0  $28     
         59      > JMP                                                          ->62
         60    >   FETCH_DIM_R                                          ~29     !6, !5
         61        FRAMELESS_ICALL_2                preg_match          $28     '%2F%5E%5B0-9%5D%2F', ~29
         62    > > JMPZ                                                         $28, ->65
  311    63    >   MUL                                                  ~30     !4, -1
         64        ASSIGN                                                       !4, ~30
  314    65    >   INIT_DYNAMIC_CALL                                            !2
         66        SEND_VAR_EX                                                  !5
         67        SEND_VAR_EX                                                  !4
         68        DO_FCALL                                          0  $32     
         69        ECHO                                                         $32
  315    70        ASSIGN_DIM                                                   !3, !5
         71        OP_DATA                                                      !4
  304    72      > JMP                                                          ->28
         73    >   FE_FREE                                                      $17
  317    74        ECHO                                                         '%0A'
  319    75      > FE_RESET_R                                           $34     !0, ->91
         76    > > FE_FETCH_R                                                   $34, !6, ->91
  320    77    > > FE_RESET_R                                           $35     !3, ->88
         78    > > FE_FETCH_R                                           ~36     $35, !4, ->88
         79    >   ASSIGN                                                       !5, ~36
  321    80        INIT_DYNAMIC_CALL                                            !2
         81        CHECK_FUNC_ARG                                               
         82        FETCH_DIM_FUNC_ARG                                   $38     !6, !5
         83        SEND_FUNC_ARG                                                $38
         84        SEND_VAR_EX                                                  !4
         85        DO_FCALL                                          0  $39     
         86        ECHO                                                         $39
  320    87      > JMP                                                          ->78
         88    >   FE_FREE                                                      $35
  323    89        ECHO                                                         '%0A'
  319    90      > JMP                                                          ->76
         91    >   FE_FREE                                                      $34
  325    92      > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 17
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  {closure:Lavoiesl\PhpBenchmark\Benchmark::outputTable():293}
number of ops:  32
compiled vars:  !0 = $string, !1 = $width, !2 = $padding
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  293     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
  294     3        IS_SMALLER                                                   0, !1
          4      > JMPZ                                                         ~3, ->17
  295     5    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cstr_pad'
          6        SEND_VAR_EX                                                  !0
          7        SEND_VAR_EX                                                  !1
          8        SEND_VAL_EX                                                  '+'
          9        DO_FCALL                                          0  $4      
         10        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cstr_repeat'
         11        SEND_VAL_EX                                                  '+'
         12        SEND_VAR_EX                                                  !2
         13        DO_FCALL                                          0  $5      
         14        CONCAT                                               ~6      $4, $5
         15      > RETURN                                                       ~6
  294    16*       JMP                                                          ->31
  297    17    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cstr_pad'
         18        SEND_VAR_EX                                                  !0
         19        MUL                                                  ~7      !1, -1
         20        SEND_VAL_EX                                                  ~7
         21        SEND_VAL_EX                                                  '+'
         22        FETCH_CONSTANT                                       ~8      'Lavoiesl%5CPhpBenchmark%5CSTR_PAD_LEFT'
         23        SEND_VAL_EX                                                  ~8
         24        DO_FCALL                                          0  $9      
         25        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cstr_repeat'
         26        SEND_VAL_EX                                                  '+'
         27        SEND_VAR_EX                                                  !2
         28        DO_FCALL                                          0  $10     
         29        CONCAT                                               ~11     $9, $10
         30      > RETURN                                                       ~11
  299    31*     > RETURN                                                       null

End of Dynamic Function 0

End of function outputtable

Function formatresults:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 56
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 56
Branch analysis from position: 12
2 jumps found. (Code = 208) Position 1 = 24, Position 2 = 29
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 208) Position 1 = 32, Position 2 = 37
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 208) Position 1 = 43, Position 2 = 51
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 37
2 jumps found. (Code = 208) Position 1 = 43, Position 2 = 51
Branch analysis from position: 43
Branch analysis from position: 51
Branch analysis from position: 29
2 jumps found. (Code = 208) Position 1 = 32, Position 2 = 37
Branch analysis from position: 32
Branch analysis from position: 37
Branch analysis from position: 56
2 jumps found. (Code = 77) Position 1 = 59, Position 2 = 88
Branch analysis from position: 59
2 jumps found. (Code = 78) Position 1 = 60, Position 2 = 88
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
Branch analysis from position: 88
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 88
Branch analysis from position: 56
filename:       /in/4Cec9
function name:  formatResults
number of ops:  91
compiled vars:  !0 = $results, !1 = $min_time, !2 = $min_memory, !3 = $result, !4 = $name, !5 = $time, !6 = $output
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  334     0  E >   RECV                                                 !0      
  336     1        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cuasort'
          2        SEND_VAR_EX                                                  !0
          3        DECLARE_LAMBDA_FUNCTION                              ~7      [0]
  341     4        SEND_VAL_EX                                                  ~7
  336     5        DO_FCALL                                          0          
  343     6        FETCH_CONSTANT                                       ~9      'Lavoiesl%5CPhpBenchmark%5CINF'
          7        ASSIGN                                                       !1, ~9
  344     8        FETCH_CONSTANT                                       ~11     'Lavoiesl%5CPhpBenchmark%5CINF'
          9        ASSIGN                                                       !2, ~11
  346    10      > FE_RESET_R                                           $13     !0, ->56
         11    > > FE_FETCH_R                                           ~14     $13, !3, ->56
         12    >   ASSIGN                                                       !4, ~14
  347    13        FETCH_DIM_R                                          ~16     !3, 'time'
         14        ASSIGN                                                       !5, ~16
  348    15        FETCH_OBJ_R                                          ~18     'base_results'
         16        FETCH_DIM_R                                          ~19     ~18, 'time'
         17        ASSIGN_OP                                         2          !5, ~19
  349    18        ASSIGN_OP                                         3          !5, 1000
  350    19        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cround'
         20        SEND_VAR_EX                                                  !5
         21        DO_FCALL                                          0  $22     
         22        ASSIGN                                                       !5, $22
  351    23      > JMP_FRAMELESS                                   s64          'lavoiesl%5Cphpbenchmark%5Cmax', ->29
         24    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmax'
         25        SEND_VAL_EX                                                  1
         26        SEND_VAR_EX                                                  !5
         27        DO_FCALL                                          0  $24     
         28      > JMP                                                          ->30
         29    >   FRAMELESS_ICALL_2                max                 $24     1, !5
         30    >   ASSIGN                                                       !5, $24
  352    31      > JMP_FRAMELESS                                   s80          'lavoiesl%5Cphpbenchmark%5Cmin', ->37
         32    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmin'
         33        SEND_VAR_EX                                                  !1
         34        SEND_VAR_EX                                                  !5
         35        DO_FCALL                                          0  $26     
         36      > JMP                                                          ->38
         37    >   FRAMELESS_ICALL_2                min                 $26     !1, !5
         38    >   ASSIGN                                                       !1, $26
  353    39        FETCH_DIM_W                                          $28     !0, !4
         40        ASSIGN_DIM                                                   $28, 'time'
         41        OP_DATA                                                      !5
  355    42      > JMP_FRAMELESS                                   s96          'lavoiesl%5Cphpbenchmark%5Cmin', ->51
         43    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cmin'
         44        SEND_VAR_EX                                                  !2
         45        CHECK_FUNC_ARG                                               
         46        FETCH_DIM_FUNC_ARG                                   $30     !0, !4
         47        FETCH_DIM_FUNC_ARG                                   $31     $30, 'memory'
         48        SEND_FUNC_ARG                                                $31
         49        DO_FCALL                                          0  $32     
         50      > JMP                                                          ->54
         51    >   FETCH_DIM_R                                          ~33     !0, !4
         52        FETCH_DIM_R                                          ~34     ~33, 'memory'
         53        FRAMELESS_ICALL_2                min                 $32     !2, ~34
         54    >   ASSIGN                                                       !2, $32
  346    55      > JMP                                                          ->11
         56    >   FE_FREE                                                      $13
  358    57        ASSIGN                                                       !6, <array>
  360    58      > FE_RESET_R                                           $37     !0, ->88
         59    > > FE_FETCH_R                                           ~38     $37, !3, ->88
         60    >   ASSIGN                                                       !4, ~38
  362    61        INIT_ARRAY                                           ~41     !4, 'Test'
  363    62        FETCH_DIM_R                                          ~42     !3, 'time'
         63        CONCAT                                               ~43     ~42, '+ms'
         64        ADD_ARRAY_ELEMENT                                    ~41     ~43, 'Time'
  364    65        INIT_STATIC_METHOD_CALL                                      'Lavoiesl%5CPhpBenchmark%5CUtil', 'relativePerc'
         66        SEND_VAR_EX                                                  !1
         67        CHECK_FUNC_ARG                                               
         68        FETCH_DIM_FUNC_ARG                                   $44     !3, 'time'
         69        SEND_FUNC_ARG                                                $44
         70        DO_FCALL                                          0  $45     
         71        ADD_ARRAY_ELEMENT                                    ~41     $45, 'Time+%28%25%29'
  365    72        INIT_STATIC_METHOD_CALL                                      'Lavoiesl%5CPhpBenchmark%5CUtil', 'convertToSI'
         73        CHECK_FUNC_ARG                                               
         74        FETCH_DIM_FUNC_ARG                                   $46     !3, 'memory'
         75        SEND_FUNC_ARG                                                $46
         76        DO_FCALL                                          0  $47     
         77        ADD_ARRAY_ELEMENT                                    ~41     $47, 'Memory'
  366    78        INIT_STATIC_METHOD_CALL                                      'Lavoiesl%5CPhpBenchmark%5CUtil', 'relativePerc'
         79        SEND_VAR_EX                                                  !2
         80        CHECK_FUNC_ARG                                               
         81        FETCH_DIM_FUNC_ARG                                   $48     !3, 'memory'
         82        SEND_FUNC_ARG                                                $48
         83        DO_FCALL                                          0  $49     
         84        ADD_ARRAY_ELEMENT                                    ~41     $49, 'Memory+%28%25%29'
  361    85        ASSIGN_DIM                                                   !6
  366    86        OP_DATA                                                      ~41
  360    87      > JMP                                                          ->59
         88    >   FE_FREE                                                      $37
  370    89      > RETURN                                                       !6
  371    90*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  {closure:Lavoiesl\PhpBenchmark\Benchmark::formatResults():336}
number of ops:  17
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  336     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
  337     2        FETCH_DIM_R                                          ~2      !0, 'time'
          3        FETCH_DIM_R                                          ~3      !1, 'time'
          4        IS_EQUAL                                                     ~2, ~3
          5      > JMPZ                                                         ~4, ->8
  338     6    > > RETURN                                                       0
  337     7*       JMP                                                          ->16
  340     8    >   FETCH_DIM_R                                          ~5      !0, 'time'
          9        FETCH_DIM_R                                          ~6      !1, 'time'
         10        IS_SMALLER                                                   ~5, ~6
         11      > JMPZ                                                         ~7, ->14
         12    >   QM_ASSIGN                                            ~8      -1
         13      > JMP                                                          ->15
         14    >   QM_ASSIGN                                            ~8      1
         15    > > RETURN                                                       ~8
  341    16*     > RETURN                                                       null

End of Dynamic Function 0

End of function formatresults

End of class Lavoiesl\PhpBenchmark\Benchmark.

Class Lavoiesl\PhpBenchmark\Util:
Function round:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  round
number of ops:  29
compiled vars:  !0 = $number, !1 = $significant, !2 = $order
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  376     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      0
  378     2        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cfloor'
          3        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Clog'
          4        SEND_VAR_EX                                                  !0
          5        DO_FCALL                                          0  $3      
          6        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Clog'
          7        SEND_VAL_EX                                                  10
          8        DO_FCALL                                          0  $4      
          9        DIV                                                  ~5      $3, $4
         10        SEND_VAL_EX                                                  ~5
         11        DO_FCALL                                          0  $6      
         12        ASSIGN                                                       !2, $6
  380    13        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cround'
         14        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cpow'
         15        SEND_VAL_EX                                                  10
         16        SEND_VAR_EX                                                  !2
         17        DO_FCALL                                          0  $8      
         18        DIV                                                  ~9      !0, $8
         19        SEND_VAL_EX                                                  ~9
         20        SEND_VAR_EX                                                  !1
         21        DO_FCALL                                          0  $10     
         22        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cpow'
         23        SEND_VAL_EX                                                  10
         24        SEND_VAR_EX                                                  !2
         25        DO_FCALL                                          0  $11     
         26        MUL                                                  ~12     $10, $11
         27      > RETURN                                                       ~12
  381    28*     > RETURN                                                       null

End of function round

Function converttosi:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Cec9
function name:  convertToSI
number of ops:  34
compiled vars:  !0 = $number, !1 = $precision, !2 = $unit, !3 = $factor, !4 = $sizes, !5 = $scale
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  392     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      2
          2        RECV_INIT                                            !2      'B'
          3        RECV_INIT                                            !3      1024
  394     4        BIND_STATIC                                                  !4
  405     5        IS_EQUAL                                                     !0, 0
          6      > JMPZ                                                         ~6, ->9
          7    >   QM_ASSIGN                                            ~7      0
          8      > JMP                                                          ->17
          9    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cfloor'
         10        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Clog'
         11        SEND_VAR_EX                                                  !0
         12        SEND_VAR_EX                                                  !3
         13        DO_FCALL                                          0  $8      
         14        SEND_VAR_NO_REF_EX                                           $8
         15        DO_FCALL                                          0  $9      
         16        QM_ASSIGN                                            ~7      $9
         17    >   ASSIGN                                                       !5, ~7
  407    18        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cround'
         19        INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cpow'
         20        SEND_VAR_EX                                                  !3
         21        SEND_VAR_EX                                                  !5
         22        DO_FCALL                                          0  $11     
         23        DIV                                                  ~12     !0, $11
         24        SEND_VAL_EX                                                  ~12
         25        SEND_VAR_EX                                                  !1
         26        DO_FCALL                                          0  $13     
         27        CONCAT                                               ~14     $13, '+'
         28        FETCH_DIM_R                                          ~15     !4, !5
         29        CONCAT                                               ~16     ~14, ~15
         30        ASSIGN                                               ~17     !2, 'B'
         31        CONCAT                                               ~18     ~16, ~17
         32      > RETURN                                                       ~18
  408    33*     > RETURN                                                       null

End of function converttosi

Function relativeperc:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/4Cec9
function name:  relativePerc
number of ops:  18
compiled vars:  !0 = $min, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
  410     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
  411     2        IS_EQUAL                                             ~2      !0, 0
          3      > JMPNZ_EX                                             ~2      ~2, ->6
          4    >   IS_EQUAL                                             ~3      !0, !1
          5        BOOL                                                 ~2      ~3
          6    > > JMPZ                                                         ~2, ->9
  412     7    > > RETURN                                                       ''
  411     8*       JMP                                                          ->17
  414     9    >   INIT_NS_FCALL_BY_NAME                                        'Lavoiesl%5CPhpBenchmark%5Cround'
         10        SUB                                                  ~4      !1, !0
         11        DIV                                                  ~5      ~4, !0
         12        MUL                                                  ~6      ~5, 100
         13        SEND_VAL_EX                                                  ~6
         14        DO_FCALL                                          0  $7      
         15        CONCAT                                               ~8      $7, '+%25'
         16      > RETURN                                                       ~8
  416    17*     > RETURN                                                       null

End of function relativeperc

End of class Lavoiesl\PhpBenchmark\Util.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
210.61 ms | 1539 KiB | 38 Q