Skip to content

Instantly share code, notes, and snippets.

@k0kubun
Last active February 25, 2018 12:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k0kubun/abae81ffb024885fc5a70933e3cbd37a to your computer and use it in GitHub Desktop.
Save k0kubun/abae81ffb024885fc5a70933e3cbd37a to your computer and use it in GitHub Desktop.
Optcarrot benchmark using benchmark_driver.gem: Intel 4.0GHz i7-4790K with 16GB memory under x86-64 Ubuntu 8 Cores
$ cat benchmark.yml
# Config for benchmark_driver.gem
type: command_stdout
name: optcarrot
command: bin/optcarrot --benchmark examples/Lan_Master.nes
metrics_type:
unit: fps
stdout_to_metrics: |
match = stdout.match(/^fps: (?<fps>\d+\.\d+)$/)
Float(match[:fps])
$ benchmark-driver benchmark.yml --rbenv '2.0.0::2.0.0-p0,-r,./tools/shim;2.5.0;2.6.0prev1::2.6.0-preview1;2.6.0prev1+JIT::2.6.0-preview1,--jit;jruby+indy::jruby-9.1.16.0,-Xcompile.invokedynamic=true;truffleruby::truffleruby,--native' --verbose 1 --repeat-count 4
2.0.0: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
2.5.0: ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
2.6.0prev1: ruby 2.6.0preview1 (2018-02-24 trunk 62554) [x86_64-linux]
2.6.0prev1+JIT: ruby 2.6.0preview1 (2018-02-24 trunk 62554) +JIT [x86_64-linux]
jruby+indy: jruby 9.1.16.0 (2.3.3) 2018-02-21 8f3f95a Java HotSpot(TM) 64-Bit Server VM 25.161-b12 on 1.8.0_161-b12 +indy +jit [linux-x86_64]
truffleruby: truffleruby 0.31, like ruby 2.3.5 <native build with Graal> [linux-x86_64]
Calculating -------------------------------------
2.0.0 2.5.0 2.6.0prev1 2.6.0prev1+JIT jruby+indy truffleruby
optcarrot 37.234 48.469 53.641 58.585 45.870 164.447 fps
Comparison:
optcarrot
truffleruby: 164.4 fps
2.6.0prev1+JIT: 58.6 fps - 2.81x slower
2.6.0prev1: 53.6 fps - 3.07x slower
2.5.0: 48.5 fps - 3.39x slower
jruby+indy: 45.9 fps - 3.59x slower
2.0.0: 37.2 fps - 4.42x slower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment