23. The Computer Language Benchmarks Game
プログラム言語ベンチマークサイト
複数言語で同じアルゴリズム的な問題を
解いて性能比較
煽りに反し「一番速いのはどの言語
か?」を決めるサイトではない
https://benchmarksgame-
team.pages.debian.net/benchmarksgame/
24. "It's important to be realistic: most people don't care about
program performance most of the time."
https://tratt.net/laurie/blog/entries/what_challenges_and_trade_offs_do_optimising_compilers_face.html
29. regex-redux (4)
PHP の方が速い!
$ time node regex-redux.js <input5000000
real 0m3.729s
user 0m3.450s
sys 0m0.377s
$ time php -dopcache.jit_buffer_size=16M -dmemory_lim
regex-redux.php <input5000000
real 0m2.349s
user 0m2.196s
sys 0m0.135s
30. regex-redux (5)
PHP でJIT 有効でも速度が変わらない?
プロファイルをとって結果を比較してみる
JIT 無効 JIT 有効
$ time php -dopcache.jit_buffer_size=0M -dmemory_lim
regex-redux.php <input5000000
real 0m2.347s
user 0m2.196s
sys 0m0.153s
$ time php -dopcache.jit_buffer_size=16M -dmemory_lim
regex-redux.php <input5000000
real 0m2.349s
user 0m2.196s
sys 0m0.135s