YJIT Benchmarks

Details for Benchmarks at 2024-11-02 03:44:14 UTC

YJIT metrics from the yjit-bench suite using Ruby 24f7829abf

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.7% faster than CRuby 3.4.0dev
  • 3.1% faster than YJIT 3.3.4
On railsbench it is
  • 105.2% faster than CRuby 3.4.0dev
  • 4.1% faster than YJIT 3.3.4

Performance on Headline Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Headline Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on Other Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Other Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on MicroBenchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on MicroBenchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Benchmark Memory Usage Details

Number of Iterations and Warmups Tested

bench CRuby 3.3.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 83 5 83 50 159 50 158
chunky-png 5 31 5 31 50 15 50 20
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 416 5 418 50 594 50 624
liquid-compile 5 410 5 404 50 548 50 550
liquid-render 5 169 5 167 50 408 50 415
lobsters 5 20 5 20 50 10 50 10
mail 5 186 5 192 50 251 50 232
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 250 50 265
ruby-lsp 5 154 5 157 50 240 50 258
sequel 5 429 5 419 50 597 50 555
binarytrees 5 83 5 83 50 146 50 148
blurhash 5 82 5 83 50 127 50 144
erubi 5 111 5 78 50 29 50 124
etanni 5 90 5 97 50 52 50 61
fannkuchredux 5 52 5 55 50 101 50 104
fluentd 5 61 5 64 50 22 50 23
graphql 5 85 5 85 50 57 50 57
graphql-native 5 40 5 52 50 10 50 14
lee 5 23 5 23 50 10 50 10
matmul 5 52 5 53 50 88 50 99
nbody 5 248 5 254 50 595 50 707
nqueens 5 119 5 120 50 74 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 172 50 616 50 688
protoboeuf-encode 5 179 5 196 50 327 50 779
rack 5 573 5 624 50 957 50 1019
ruby-json 5 84 5 82 50 51 50 48
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 160
tinygql 5 37 5 35 50 24 50 26
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 38 5 38 50 481 50 477
cfunc_itself 5 347 5 308 50 1046 50 1136
fib 5 127 5 127 50 899 50 962
getivar 5 206 5 213 50 2270 50 2614
keyword_args 5 108 5 103 50 958 50 1231
object-new 5 321 5 271 50 406 50 305
respond_to 5 137 5 139 50 3257 50 4036
ruby-xor 5 243 5 244 50 803 50 1375
setivar 5 360 5 356 50 3126 50 5715
setivar_object 5 372 5 350 50 762 50 787
setivar_young 5 372 5 352 50 771 50 844
str_concat 5 398 5 401 50 974 50 1162
throw 5 1267 5 1141 50 1721 50 1399

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 Compile Time MS
activerecord (click) 1480740 1201922 213 2296 0 0% 0 0 66.280091
chunky-png (click) 295897 260426 86 1133 1 0% 0 0 34.382536
erubi-rails (click) 1928163 1651593 249 2852 8 0% 0 0 78.375574
hexapdf (click) 1490553 1279650 597 13852 39 0% 0 0 396.43923
liquid-c (click) 522676 433195 119 1852 5 0% 0 0 52.704995
liquid-compile (click) 410016 362735 150 2210 2 0% 0 0 67.342522
liquid-render (click) 599471 537782 136 2466 12 0% 0 0 68.875668
lobsters (click) 8338730 7002108 3213 54384 182 0% 0 0 1833.394939
mail (click) 740528 635068 346 5481 16 0% 0 0 159.278027
psych-load (click) 283036 231912 64 654 3 0% 0 0 20.442008
railsbench (click) 3301082 2825152 1632 16678 41 0% 0 0 475.106706
rubocop (click) 5812942 5098663 2891 52170 110 0% 4 0 1516.432077
ruby-lsp (click) 845450 735824 308 4986 26 0% 0 0 141.787333
sequel (click) 491691 412794 15 125 0 0% 0 0 4.588181
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.017357
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.178503
erubi (click) 230840 201328 9 108 0 0% 0 0 3.632258
etanni (click) 27632 25826 9 85 0 0% 0 0 2.907275
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.728119
fluentd (click) 345574 295650 10 109 0 0% 0 0 4.083697
graphql (click) 424386 387699 69 695 0 0% 0 0 20.701416
graphql-native (click) 359393 306523 40 270 0 0% 0 0 8.612789
lee (click) 285146 266896 48 803 0 0% 0 0 24.721239
matmul (click) 11838 4563 10 119 0 0% 0 0 3.912564
nbody (click) 14884 19325 8 196 0 0% 0 0 5.051635
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.234288
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 105.124116
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.093723
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.061759
rack (click) 237601 200130 36 417 0 0% 0 0 10.89773
ruby-json (click) 24665 21345 10 187 0 0% 0 0 5.375167
rubykon (click) 140693 120664 138 1568 3 0% 0 0 44.85603
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.945552
tinygql (click) 277778 235608 61 787 5 0% 0 0 22.130765
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1586.750361
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 451.654453
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.974144
fib (click) 4041 4120 5 37 0 0% 0 0 1.424191
getivar (click) 5037 6014 6 64 0 0% 0 0 1.976522
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.079094
object-new (click) 3469 3394 5 35 0 0% 0 0 1.346779
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.795168
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.223576
setivar (click) 4188 4690 6 44 0 0% 0 0 1.52093
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.640228
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.903543
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.609004
throw (click) 7384 5592 8 59 0 0% 0 0 2.1167

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.