YJIT Benchmarks

Details for Benchmarks at 2024-09-18 03:50:35 UTC

YJIT metrics from the yjit-bench suite using Ruby 4797b0704a

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 77.9% faster than CRuby 3.4.0dev
  • 4.3% faster than YJIT 3.3.4
On railsbench it is
  • 77.2% faster than CRuby 3.4.0dev
  • 2.4% 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 10 58 10 58 10 146 10 153
chunky-png 10 18 10 17 10 35 10 40
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 341 10 349 10 498 10 506
liquid-compile 10 346 10 347 10 501 10 505
liquid-render 10 138 10 134 10 359 10 365
lobsters 10 13 10 13 10 24 10 23
mail 10 158 10 158 10 233 10 238
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 127 10 126 10 212 10 230
binarytrees 10 51 10 51 10 118 10 115
blurhash 10 62 10 63 10 120 10 144
erubi 10 79 10 102 10 106 10 126
etanni 10 59 10 70 10 69 10 82
fannkuchredux 10 10 10 10 10 17 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 29 10 41 10 33 10 47
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 17
nbody 10 203 10 202 10 421 10 533
nqueens 10 113 10 114 10 113 10 425
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 154 10 582 10 643
protoboeuf-encode 10 132 10 166 10 294 10 656
rack 10 458 10 502 10 842 10 960
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 28 10 30
tinygql 10 23 10 23 10 51 10 54
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 246 10 262 10 1108 10 1211
fib 10 102 10 99 10 616 10 623
getivar 10 214 10 224 10 1249 10 1735
keyword_args 10 90 10 90 10 729 10 947
object-new 10 228 10 188 10 308 10 232
respond_to 10 90 10 88 10 1785 10 2216
ruby-xor 10 30 10 30 10 92 10 166
setivar 10 348 10 391 10 2319 10 3109
setivar_object 10 215 10 220 10 536 10 480
setivar_young 10 216 10 218 10 528 10 475
str_concat 10 319 10 347 10 658 10 664
throw 10 968 10 827 10 1339 10 1029

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) 1446088 1253030 214 2301 0 0% 0 0 80.980374
chunky-png (click) 296412 269191 82 1090 1 0% 0 0 37.56409
erubi-rails (click) 1931114 1632272 245 2837 8 0% 0 0 91.608464
hexapdf (click) 1357910 1165253 507 12572 38 0% 0 0 430.965429
liquid-c (click) 522061 465139 119 1859 5 0% 0 0 61.295834
liquid-compile (click) 417191 377074 150 2219 2 0% 0 0 80.283938
liquid-render (click) 606615 544150 136 2473 12 0% 0 0 81.551748
lobsters (click) 8067220 6739235 3086 51910 182 0% 0 0 2078.403882
mail (click) 734856 654247 346 5489 16 0% 0 0 188.253212
psych-load (click) 255354 231819 60 615 3 0% 0 0 22.515166
railsbench (click) 3300441 2894440 1631 16678 41 0% 0 0 563.056125
ruby-lsp (click) 887909 741315 308 4991 26 0% 0 0 170.170049
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.420971
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.847526
erubi (click) 240517 218818 9 108 0 0% 0 0 4.28831
etanni (click) 28241 26371 10 86 0 0% 0 0 3.314627
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.178908
fluentd (click) 338108 291525 3 22 0 0% 0 0 1.013502
graphql (click) 388140 324218 65 651 0 0% 0 0 22.941017
graphql-native (click) 363500 301565 41 275 0 0% 0 0 10.270008
lee (click) 249871 209139 33 567 0 0% 0 0 20.853461
matmul (click) 7323 8338 6 76 0 0% 0 0 3.036565
nbody (click) 15428 19810 9 201 0 0% 0 0 6.34742
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.550235
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.98766
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.199208
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.72868
rack (click) 240999 188988 36 417 0 0% 0 0 13.119444
ruby-json (click) 24330 21342 6 159 0 0% 0 0 5.287648
rubykon (click) 140687 120490 135 1573 3 0% 0 0 53.032392
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.590286
tinygql (click) 283324 257428 57 743 5 0% 0 0 24.610971
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1926.880005
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 552.629564
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.246289
fib (click) 4585 4605 6 42 0 0% 0 0 1.839827
getivar (click) 5037 6014 6 64 0 0% 0 0 2.212004
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.602704
object-new (click) 3469 3394 5 35 0 0% 0 0 1.563198
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.562853
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.826023
setivar (click) 4188 4690 6 44 0 0% 0 0 1.699992
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.872407
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.100535
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.260404
throw (click) 7384 5592 8 59 0 0% 0 0 2.35709

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.