YJIT Benchmarks

Details for Benchmarks at 2024-05-19 03:08:35 UTC

YJIT metrics from the yjit-bench suite using Ruby 7afc16aa48

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.5% faster than CRuby 3.4.0dev
  • 2.3% faster than YJIT 3.3.3
On railsbench it is
  • 77.3% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.3

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.3 warmups CRuby 3.3.3 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.3 warmups YJIT 3.3.3 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 10 51 10 49 10 116 10 115
chunky-png 10 18 10 17 10 36 10 37
erubi-rails 10 10 10 10 10 20 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 352 10 348 10 502 10 505
liquid-compile 10 341 10 342 10 490 10 501
liquid-render 10 138 10 136 10 353 10 367
lobsters 10 14 10 13 10 23 10 23
mail 10 162 10 155 10 238 10 226
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 136 10 131 10 228 10 246
ruby-lsp 10 127 10 126 10 209 10 216
sequel 10 325 10 316 10 437 10 414
binarytrees 10 51 10 51 10 117 10 124
blurhash 10 62 10 60 10 118 10 145
erubi 10 83 10 85 10 103 10 104
etanni 10 58 10 25 10 68 10 28
fannkuchredux 10 10 10 10 10 18 10 17
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 34 10 35 10 39 10 40
lee 10 11 10 11 10 19 10 20
matmul 10 10 10 10 10 15 10 17
nbody 10 210 10 201 10 385 10 502
nqueens 10 115 10 109 10 115 10 446
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 189 10 180 10 680 10 768
rack 10 459 10 455 10 805 10 842
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 31 10 31
tinygql 10 25 10 23 10 52 10 51
30k_ifelse 10 10 10 10 10 70 10 70
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 257 10 260 10 1105 10 1211
fib 10 104 10 107 10 616 10 618
getivar 10 255 10 255 10 1275 10 1372
keyword_args 10 90 10 87 10 726 10 945
respond_to 10 89 10 92 10 1780 10 2150
ruby-xor 10 31 10 31 10 100 10 157
setivar 10 416 10 372 10 2353 10 3547
setivar_object 10 263 10 235 10 653 10 705
setivar_young 10 262 10 234 10 649 10 729
str_concat 10 326 10 336 10 592 10 626
throw 10 975 10 966 10 1277 10 1170

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) 1415475 1191978 214 2184 0 0% 0 0 66.575509
chunky-png (click) 327850 260601 82 1048 1 0% 0 0 31.110327
erubi-rails (click) 1682004 1443108 272 2925 6 0% 0 0 83.190842
hexapdf (click) 1285522 1112847 505 11531 41 0% 0 0 335.762552
liquid-c (click) 515721 411521 119 1757 5 0% 0 0 48.995882
liquid-compile (click) 439732 384029 151 2078 2 0% 0 0 65.274795
liquid-render (click) 613045 540271 136 2292 8 0% 0 0 63.899915
lobsters (click) 7559318 6259946 3107 48946 89 0% 0 0 1644.811718
mail (click) 721340 589229 346 4874 14 0% 0 0 145.474555
psych-load (click) 293013 231197 61 617 3 0% 0 0 19.687215
railsbench (click) 2945105 2501576 1633 15957 57 0% 0 0 462.821463
rubocop (click) 5319463 4530781 2901 48254 112 0% 4 0 1451.06068
ruby-lsp (click) 820941 683095 309 4479 24 0% 0 0 128.168159
sequel (click) 481006 398760 16 118 0 0% 0 0 4.367857
binarytrees (click) 8756 7777 10 70 0 0% 0 0 2.761337
blurhash (click) 50429 43273 31 455 0 0% 0 0 15.431306
erubi (click) 266200 214192 10 112 0 0% 0 0 3.904692
etanni (click) 29692 28216 11 91 0 0% 0 0 2.985008
fannkuchredux (click) 21198 26809 5 228 0 0% 0 0 7.098768
fluentd (click) 374318 299110 4 28 0 0% 0 0 1.135667
graphql (click) 427555 337825 66 644 0 0% 0 0 20.006116
graphql-native (click) 399624 331157 42 278 0 0% 0 0 9.515515
lee (click) 289662 254761 34 528 0 0% 0 0 17.082049
matmul (click) 8300 983 8 85 0 0% 0 0 2.925944
nbody (click) 14798 17933 11 185 0 0% 0 0 5.137123
nqueens (click) 22703 29059 10 260 0 0% 0 0 7.913995
optcarrot (click) 307949 264223 188 4285 34 0% 0 0 102.499483
protoboeuf (click) 146719 143337 17 1366 0 0% 0 0 41.750665
rack (click) 272372 212736 37 418 0 0% 0 0 11.383205
ruby-json (click) 30222 27890 8 167 0 0% 0 0 4.934654
rubykon (click) 127405 128474 137 1461 3 0% 0 0 41.788072
sudoku (click) 42479 58142 8 475 0 0% 0 0 14.92245
tinygql (click) 304456 267794 58 741 5 0% 0 0 21.446899
30k_ifelse (click) 5134674 4729436 9259 50778 0 0% 0 0 1507.32549
30k_methods (click) 2016920 1591842 5778 19339 0 0% 0 0 516.100056
cfunc_itself (click) 7534 6180 9 70 0 0% 0 0 2.200067
fib (click) 4970 5003 8 49 0 0% 0 0 1.741849
getivar (click) 5963 6375 8 74 0 0% 0 0 2.096281
keyword_args (click) 8409 6912 10 72 0 0% 0 0 2.508233
respond_to (click) 8277 8274 9 85 0 0% 0 0 2.645565
ruby-xor (click) 5593 5796 5 62 0 0% 0 0 1.72919
setivar (click) 5102 5375 8 54 0 0% 0 0 1.779545
setivar_object (click) 5470 5395 8 54 0 0% 0 0 1.87276
setivar_young (click) 6182 6093 9 62 0 0% 0 0 2.074217
str_concat (click) 7774 7946 11 85 0 0% 0 0 2.920502
throw (click) 7895 6377 10 69 0 0% 0 0 2.569054

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.