2 ms·
Was curious. The same implementation as /u/toolslive: PHP 8.0.12: $ time php fib.php 42 42 433494437 real 0m29.274s user 0m29.003s sys 0m0.10
by egman_ekki 5y ago
Was curious. The same implementation as /u/toolslive:
PHP 8.0.12:
$ time php fib.php 42
42 433494437
real 0m29.274s
user 0m29.003s
sys 0m0.105s
$ time php -dopcache.enable_cli=1 fib.php 42
42 433494437
real 0m26.341s
user 0m26.179s
sys 0m0.058s
----------------------------------------
PHP 7.3.5:
$ time php fib.php 42
42 433494437
real 10m23.573s
user 10m16.592s
sys 0m1.828s
----------------------------------------
Settings for PHP 8:
PHP Version => 8.0.12
auto_globals_jit => On => On
pcre.jit => 1 => 1
opcache.jit => tracing => tracing
opcache.jit_bisect_limit => 0 => 0
opcache.jit_blacklist_root_trace => 16 => 16
opcache.jit_blacklist_side_trace => 8 => 8
opcache.jit_buffer_size => 0 => 0
opcache.jit_debug => 0 => 0
opcache.jit_hot_func => 127 => 127
opcache.jit_hot_loop => 64 => 64
opcache.jit_hot_return => 8 => 8
opcache.jit_hot_side_exit => 8 => 8
opcache.jit_max_exit_counters => 8192 => 8192
opcache.jit_max_loop_unrolls => 8 => 8
opcache.jit_max_polymorphic_calls => 2 => 2
opcache.jit_max_recursive_calls => 2 => 2
opcache.jit_max_recursive_returns => 2 => 2
opcache.jit_max_root_traces => 1024 => 1024
opcache.jit_max_side_traces => 128 => 128
opcache.jit_prof_threshold => 0.005 => 0.005