Skip to content

Instantly share code, notes, and snippets.

❯ ruby --yjit plot.rb kotlin-wasm-eval-fast.json
┌ ┐
./benchmarks-bun.sh eval-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 34.566014226200004
./benchmarks-jvm.sh eval-fast ┤■■■■■■■■ 3.6206429516
./benchmarks-native.sh eval-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 16.9771580748
./benchmarks-node.sh eval-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 32.925853603600004
./benchmarks-wasm-wasi.sh eval-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■ 11.295171940900001
./benchmarks-wasm-js.sh eval-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■ 11.3097880403
└ ┘
❯ ruby --yjit plot.rb kotlin-wasm-vm-fast.json
┌ ┐
./benchmarks-bun.sh vm-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 22.704543833360002
./benchmarks-jvm.sh vm-fast ┤■■■■■■■■■■■■■■■■■■ 5.12403986566
./benchmarks-native.sh vm-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 10.128824652159999
./benchmarks-node.sh vm-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 22.852397735060002
./benchmarks-wasm-wasi.sh vm-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 15.80210154176
./benchmarks-wasm-js.sh vm-fast ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 17.04475952096
@MarioAriasC
MarioAriasC / plot.rb
Last active November 26, 2024 17:10
# frozen_string_literal: true
# install this gem first
require 'unicode_plot'
require 'json'
hf_json = JSON.parse(File.read(ARGV[0]))
hf_results = hf_json["results"]
hyperfine -w 3 './exe/benchmark-linux-tr-yjit'
Benchmark 1: ./exe/benchmark-linux-tr-yjit
Time (mean ± σ): 150.3 ms ± 1.2 ms [User: 133.1 ms, System: 16.9 ms]
Range (min … max): 148.3 ms … 152.6 ms 19 runs
hyperfine -w 3 'luajit benchmarks.lua'
Benchmark 1: luajit benchmarks.lua
Time (mean ± σ): 82.749 s ± 1.416 s [User: 82.740 s, System: 0.002 s]
Range (min … max): 80.846 s … 85.703 s 10 runs
hyperfine -w 3 'lua benchmarks.lua'
Benchmark 1: lua benchmarks.lua
Time (mean ± σ): 140.583 s ± 2.741 s [User: 140.575 s, System: 0.004 s]
Range (min … max): 138.264 s … 147.545 s 10 runs
hyperfine -w 3 './benchmarks.sh --eval-fast'
Benchmark 1: ./benchmarks.sh --eval-fast
Time (mean ± σ): 4.942 s ± 0.102 s [User: 4.935 s, System: 0.006 s]
Range (min … max): 4.829 s … 5.189 s 10 runs
hyperfine -w 3 './fibonacci --engine=eval'
Benchmark 1: ./fibonacci --engine=eval
Time (mean ± σ): 10.546 s ± 0.042 s [User: 11.254 s, System: 0.353 s]
Range (min … max): 10.503 s … 10.650 s 10 runs
hyperfine -w 3 './bin/benchmark eval'
Benchmark 1: ./bin/benchmark eval
Time (mean ± σ): 10.583 s ± 0.211 s [User: 10.581 s, System: 0.001 s]
Range (min … max): 10.407 s … 11.075 s 10 runs
hyperfine -w 3 './benchmark-linux-yjit'
Benchmark 1: ./benchmark-linux-yjit
Time (mean ± σ): 52.484 s ± 0.681 s [User: 52.279 s, System: 0.197 s]
Range (min … max): 51.637 s … 54.159 s 10 runs