YJIT Benchmarks

Details for Benchmarks at 2024-05-15 06:08:17 UTC

Overall YJIT is 71.6% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 79.3% faster than CRuby!

The basic "faster" measurement is the geomean of all "headlining" x86 benchmarks on this page.

Headlining Benchmarks

These are "headlining" because the "overall" speedup above is based on these benchmarks specifically.

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

Other Benchmarks

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

MicroBenchmarks

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Benchmark Memory Usage Details

Number of Iterations and Warmups Tested

bench No JIT warmups No JIT iters YJIT 3.3 warmups YJIT 3.3 iters YJIT 3.4dev warmups YJIT 3.4dev iters
activerecord 10 49 10 102 10 117
chunky-png 10 16 10 34 10 38
erubi-rails 10 10 10 17 10 20
hexapdf 10 10 10 10 10 10
liquid-c 10 347 10 469 10 508
liquid-compile 10 337 10 465 10 496
liquid-render 10 133 10 332 10 357
lobsters 10 12 10 22 10 23
mail 10 156 10 211 10 227
psych-load 10 10 10 10 10 10
railsbench 10 10 10 10 10 10
rubocop 10 131 10 213 10 241
ruby-lsp 10 171 10 232 10 254
sequel 10 313 10 388 10 418
binarytrees 10 50 10 94 10 122
blurhash 10 57 10 126 10 143
erubi 10 85 10 96 10 107
etanni 10 25 10 62 10 27
fannkuchredux 10 10 10 14 10 16
fluentd 10 10 10 10 10 10
graphql 10 10 10 10 10 10
graphql-native 10 35 10 36 10 39
lee 10 11 10 16 10 20
matmul 10 10 10 15 10 15
nbody 10 199 10 454 10 468
nqueens 10 105 10 111 10 422
optcarrot 10 10 10 10 10 10
protoboeuf 10 178 10 541 10 763
rack 10 461 10 750 10 819
ruby-json 10 10 10 10 10 10
rubykon 10 10 10 10 10 10
sudoku 10 10 10 26 10 28
tinygql 10 22 10 45 10 51
30k_ifelse 10 10 10 70 10 70
30k_methods 10 10 10 26 10 26
cfunc_itself 10 252 10 1105 10 1212
fib 10 108 10 616 10 618
getivar 10 257 10 1276 10 1374
keyword_args 10 86 10 720 10 945
respond_to 10 92 10 1728 10 2149
ruby-xor 10 29 10 94 10 144
setivar 10 388 10 2349 10 3561
setivar_object 10 255 10 472 10 709
setivar_young 10 255 10 501 10 738
str_concat 10 342 10 638 10 608
throw 10 938 10 1164 10 1159

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT and MJIT 3.0 both warm up quite quickly, while MJIT in 3.1 often slows down for a time as it compiles, after an unpredictable delay.

Benchmark YJIT Stats

Hover your cursor over the benchmark names for descriptions of each benchmark.

bench Exit Report Inline Outlined Comp iSeqs Comp Blocks Inval Inval Ratio Bind Alloc Bind Set Const Bumps
activerecord (click) 1426378 1245957 214 2184 0 0% 0 0
chunky-png (click) 338682 289940 82 1048 1 0% 0 0
erubi-rails (click) 1689645 1461109 272 2896 6 0% 0 0
hexapdf (click) 1295430 1173778 504 11519 41 0% 0 0
liquid-c (click) 525983 465202 119 1757 5 0% 0 0
liquid-compile (click) 449662 371558 151 2071 2 0% 0 0
liquid-render (click) 624250 504389 136 2294 8 0% 0 0
lobsters (click) 7564620 6274862 3109 48877 89 0% 0 0
mail (click) 731573 650703 346 4865 14 0% 0 0
psych-load (click) 303523 243898 61 615 3 0% 0 0
railsbench (click) 2954014 2528910 1633 15941 57 0% 0 0
rubocop (click) 5333115 4595701 2901 48282 112 0% 4 0
ruby-lsp (click) 634411 521685 159 2803 28 0% 0 0
sequel (click) 489372 417861 16 119 0 0% 0 0
binarytrees (click) 8756 7777 10 70 0 0% 0 0
blurhash (click) 50429 43273 31 455 0 0% 0 0
erubi (click) 277032 210763 10 112 0 0% 0 0
etanni (click) 29692 28216 11 91 0 0% 0 0
fannkuchredux (click) 21198 26809 5 228 0 0% 0 0
fluentd (click) 385215 320289 4 28 0 0% 0 0
graphql (click) 438485 359047 66 644 0 0% 0 0
graphql-native (click) 409694 368211 42 278 0 0% 0 0
lee (click) 300558 267787 34 528 0 0% 0 0
matmul (click) 8300 983 8 85 0 0% 0 0
nbody (click) 14798 17933 11 185 0 0% 0 0
nqueens (click) 22703 29059 10 260 0 0% 0 0
optcarrot (click) 307949 264223 188 4285 34 0% 0 0
protoboeuf (click) 146719 143337 17 1366 0 0% 0 0
rack (click) 283204 225627 37 418 0 0% 0 0
ruby-json (click) 30222 27890 8 167 0 0% 0 0
rubykon (click) 127405 128474 137 1461 3 0% 0 0
sudoku (click) 42479 58142 8 475 0 0% 0 0
tinygql (click) 315294 256178 58 741 5 0% 0 0
30k_ifelse (click) 5134674 4729436 9259 50778 0 0% 0 0
30k_methods (click) 2016920 1591842 5778 19339 0 0% 0 0
cfunc_itself (click) 7534 6180 9 70 0 0% 0 0
fib (click) 4970 5003 8 49 0 0% 0 0
getivar (click) 5963 6375 8 74 0 0% 0 0
keyword_args (click) 8409 6912 10 72 0 0% 0 0
respond_to (click) 8277 8274 9 85 0 0% 0 0
ruby-xor (click) 5593 5796 5 62 0 0% 0 0
setivar (click) 5102 5375 8 54 0 0% 0 0
setivar_object (click) 5470 5395 8 54 0 0% 0 0
setivar_young (click) 6182 6093 9 62 0 0% 0 0
str_concat (click) 7774 7946 11 85 0 0% 0 0
throw (click) 7895 6377 10 69 0 0% 0 0

YJIT stats correspond to the YJIT stats exit report.

Note: currently, all stats are collected on x86_64, not ARM.

Raw JSON data files

All graphs and table data in this page comes from processing these data files, which come from benchmark runs.