Shopify / yjit-bench

Set of benchmarks for the YJIT CRuby JIT compiler and other Ruby implementations.
MIT License
87 stars 22 forks source link

Reduce dependency requirements to enable running some benchmarks with miniruby #308

Closed rwstauner closed 4 months ago

rwstauner commented 4 months ago

Makes the output differ thusly:

$ WARMUP_ITRS=1 MIN_BENCH_ITRS=2 MIN_BENCH_TIME=0 ruby ~shopify/yjit-bench/benchmarks/protoboeuf-encode/benchmark.rb
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
itr #1: 102ms
itr #2: 98ms
itr #3: 98ms
RSS: 51.3MiB
MAXRSS: 52912.0MiB
Writing file /Users/rwstauner/src/github.com/ruby/ruby/data/results-ruby-3.3.0-2024-07-16-132905.json
Average of last 2, non-warmup iters: 98ms

$ WARMUP_ITRS=1 MIN_BENCH_ITRS=2 MIN_BENCH_TIME=0 ./miniruby -r./rbconfig ~shopify/yjit-bench/benchmarks/protoboeuf-encode/benchmark.rb
ruby 3.4.0dev (2024-07-16T19:50:00Z master c083a3ffcd) [arm64-darwin23]
itr #1: 96ms
itr #2: 91ms
itr #3: 91ms
RSS: 54.2MiB
Failed to get max RSS: cannot load such file -- fiddle
Failed to write JSON file: cannot load such file -- json
Average of last 2, non-warmup iters: 91ms