YJIT Benchmarks

Details for Benchmarks at 2024-08-07 17:18:52 UTC

YJIT metrics from the yjit-bench suite using Ruby 53f3036bf9

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.3% faster than CRuby 3.4.0dev
  • 1.5% faster than YJIT 3.3.4
On railsbench it is
  • 79.6% faster than CRuby 3.4.0dev
  • the same speed as 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 49 10 48 10 110 10 120
chunky-png 10 18 10 15 10 36 10 36
erubi-rails 10 10 10 10 10 20 10 19
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 340 10 332 10 478 10 488
liquid-compile 10 338 10 328 10 481 10 491
liquid-render 10 140 10 130 10 353 10 361
lobsters 10 14 10 13 10 24 10 23
mail 10 158 10 149 10 227 10 222
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 136 10 128 10 229 10 237
ruby-lsp 10 130 10 122 10 204 10 205
sequel 10 314 10 309 10 418 10 412
binarytrees 10 51 10 49 10 118 10 116
blurhash 10 62 10 57 10 120 10 143
erubi 10 84 10 86 10 103 10 110
etanni 10 59 10 58 10 69 10 67
fannkuchredux 10 10 10 10 10 18 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 35 10 32 10 41 10 37
lee 10 11 10 10 10 19 10 19
matmul 10 10 10 10 10 15 10 16
nbody 10 207 10 194 10 407 10 467
nqueens 10 117 10 105 10 117 10 436
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 180 10 172 10 587 10 696
protoboeuf-encode 10 123 10 125 10 275 10 432
rack 10 461 10 460 10 813 10 870
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 30
tinygql 10 24 10 21 10 51 10 51
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 256 10 237 10 1104 10 1212
fib 10 103 10 98 10 616 10 618
getivar 10 227 10 219 10 1283 10 1726
keyword_args 10 92 10 85 10 720 10 947
object-new 10 228 10 198 10 300 10 248
respond_to 10 95 10 86 10 1728 10 2093
ruby-xor 10 31 10 26 10 98 10 132
setivar 10 423 10 417 10 2355 10 4877
setivar_object 10 265 10 264 10 653 10 702
setivar_young 10 264 10 264 10 651 10 696
str_concat 10 329 10 300 10 592 10 529
throw 10 987 10 915 10 1272 10 1137

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) 1360403 1188711 214 2169 0 0% 0 0 80.882154
chunky-png (click) 274458 246593 83 1054 1 0% 0 0 36.070009
erubi-rails (click) 1649990 1353388 274 2920 6 0% 0 0 103.12245
hexapdf (click) 1248162 1070610 505 11811 35 0% 0 0 412.826419
liquid-c (click) 484370 427557 119 1768 5 0% 0 0 58.329578
liquid-compile (click) 386757 329217 151 2074 2 0% 0 0 74.367019
liquid-render (click) 578724 482162 136 2323 8 0% 0 0 77.042944
lobsters (click) 7558510 6450925 3080 49601 81 0% 0 0 2244.165779
mail (click) 722408 661863 347 5553 14 0% 0 0 188.512935
psych-load (click) 248665 222276 61 592 3 0% 0 0 21.28389
railsbench (click) 2899017 2463828 1636 16002 57 0% 0 0 590.163185
rubocop (click) 5432684 4577494 2892 50927 110 0% 4 0 1936.319584
ruby-lsp (click) 799896 700610 309 4750 24 0% 0 0 161.330857
sequel (click) 430260 386062 16 120 0 0% 0 0 5.734857
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.995136
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.821574
erubi (click) 227189 187321 10 112 0 0% 0 0 4.447601
etanni (click) 28405 26890 11 91 0 0% 0 0 3.471973
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.709007
fluentd (click) 327825 289995 4 28 0 0% 0 0 1.423682
graphql (click) 387086 309704 66 650 0 0% 0 0 22.927579
graphql-native (click) 367354 302974 41 273 0 0% 0 0 10.427432
lee (click) 236628 199446 34 531 0 0% 0 0 19.556863
matmul (click) 7957 8968 7 82 0 0% 0 0 3.218774
nbody (click) 15014 19017 10 191 0 0% 0 0 6.172115
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.593988
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.190091
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 49.177375
protoboeuf-encode (click) 212046 174944 18 1189 0 0% 0 0 36.773366
rack (click) 243840 220437 37 446 0 0% 0 0 14.746941
ruby-json (click) 24237 21549 7 166 0 0% 0 0 5.473806
rubykon (click) 128589 131709 136 1482 3 0% 0 0 48.531418
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.203039
tinygql (click) 264829 232563 58 735 5 0% 0 0 24.167034
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1923.299057
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 533.02544
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.42316
fib (click) 4609 4792 7 45 0 0% 0 0 1.880645
getivar (click) 5575 6644 7 70 0 0% 0 0 2.38747
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.6818
object-new (click) 4039 4024 6 41 0 0% 0 0 2.165907
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.876204
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 2.00447
setivar (click) 4726 5320 7 50 0 0% 0 0 1.950303
setivar_object (click) 5109 5228 7 50 0 0% 0 0 2.005004
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.241912
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.190583
throw (click) 7538 6222 9 65 0 0% 0 0 2.782148

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.