YJIT Benchmarks

Details for Benchmarks at 2024-12-01 03:53:21 UTC

YJIT metrics from the yjit-bench suite using Ruby 0fc70022e6.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.0% faster than CRuby 3.4.0dev
  • 4.4% faster than YJIT 3.3.6
On railsbench it is
  • 94.3% faster than CRuby 3.4.0dev
  • 5.5% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 45 minutes
aarch64 runtime: 3 hours, 12 minutes

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.6 warmups CRuby 3.3.6 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 82 5 83 50 156 50 162
chunky-png 5 31 5 32 50 15 50 34
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 411 5 423 50 587 50 630
liquid-compile 5 406 5 420 50 540 50 557
liquid-render 5 170 5 168 50 403 50 430
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 189 50 236 50 206
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 155 50 248 50 263
ruby-lsp 5 157 5 153 50 248 50 243
sequel 5 418 5 421 50 597 50 576
binarytrees 5 84 5 81 50 143 50 143
blurhash 5 82 5 83 50 122 50 145
erubi 5 75 5 150 50 98 50 139
etanni 5 91 5 99 50 54 50 70
fannkuchredux 5 52 5 54 50 101 50 104
fluentd 5 63 5 63 50 26 50 22
graphql 5 85 5 86 50 57 50 56
graphql-native 5 40 5 52 50 10 50 15
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 52 50 84 50 97
nbody 5 248 5 253 50 577 50 717
nqueens 5 120 5 120 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 172 50 620 50 745
protoboeuf-encode 5 178 5 196 50 326 50 817
rack 5 576 5 626 50 948 50 1066
ruby-json 5 84 5 83 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 47 50 164 50 162
tinygql 5 36 5 36 50 23 50 27
30k_ifelse 5 28 5 28 50 215 50 194
30k_methods 5 38 5 38 50 482 50 471
cfunc_itself 5 341 5 339 50 1046 50 1135
fib 5 126 5 127 50 901 50 962
getivar 5 207 5 215 50 2267 50 2594
keyword_args 5 105 5 94 50 959 50 1231
object-new 5 321 5 312 50 404 50 382
respond_to 5 133 5 139 50 3252 50 4031
ruby-xor 5 242 5 244 50 801 50 1377
setivar 5 357 5 357 50 3125 50 5709
setivar_object 5 374 5 342 50 780 50 851
setivar_young 5 373 5 344 50 767 50 846
str_concat 5 402 5 396 50 963 50 1208
throw 5 1259 5 1295 50 1735 50 1705

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) 1496354 1275648 213 2351 0 0% 0 0 68.234983
chunky-png (click) 319300 317492 88 1225 17 1% 0 0 37.019953
erubi-rails (click) 1967558 1634279 263 3064 19 0% 0 0 84.108024
hexapdf (click) 1536589 1313511 600 14001 174 1% 0 0 403.217592
liquid-c (click) 519796 448418 118 1846 5 0% 0 0 52.305069
liquid-compile (click) 423096 351008 150 2219 2 0% 0 0 69.011661
liquid-render (click) 611073 524973 135 2468 12 0% 0 0 69.669628
lobsters (click) 8432786 7083716 3214 54918 189 0% 0 0 1884.951467
mail (click) 788964 699544 347 5588 57 1% 0 0 161.167268
psych-load (click) 285571 251169 65 663 17 2% 0 0 20.817238
railsbench (click) 3383713 2936597 1646 17049 52 0% 0 0 490.43705
rubocop (click) 5886205 5174750 2891 52412 110 0% 4 0 1627.908408
ruby-lsp (click) 857071 766148 309 5004 26 0% 0 0 143.6017
sequel (click) 500458 432270 16 126 54 42% 0 0 4.838745
binarytrees (click) 14397 12917 14 126 0 0% 1 0 4.566394
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.5938
erubi (click) 262092 230262 8 113 0 0% 0 0 3.869975
etanni (click) 32243 30528 9 94 0 0% 0 0 3.231825
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.216123
fluentd (click) 367470 306150 10 109 0 0% 0 0 3.812025
graphql (click) 440213 396583 69 695 0 0% 0 0 21.606038
graphql-native (click) 381585 351478 40 270 0 0% 0 0 9.180929
lee (click) 283345 252838 49 848 17 2% 0 0 26.173062
matmul (click) 16519 8883 16 169 4 2% 1 0 5.491262
nbody (click) 19555 23574 14 246 0 0% 1 0 6.627725
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.686418
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 104.911018
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.3631
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.453524
rack (click) 273320 234216 37 424 16 3% 0 0 11.227834
ruby-json (click) 27119 23942 10 187 0 0% 0 0 5.345434
rubykon (click) 142727 123210 140 1592 7 0% 0 0 45.488256
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.332782
tinygql (click) 303850 252007 62 795 20 2% 0 0 23.001206
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1548.778618
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 452.478717
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.562887
fib (click) 8722 8374 11 87 0 0% 1 0 2.942829
getivar (click) 9718 10268 12 114 0 0% 1 0 3.443151
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.635375
object-new (click) 4638 4712 7 49 1 2% 0 0 1.814051
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.296228
ruby-xor (click) 11004 11151 12 122 2 1% 1 0 3.757362
setivar (click) 5357 5942 8 58 0 0% 0 0 2.060662
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.239946
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.447989
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.276462
throw (click) 12065 9846 14 109 0 0% 1 0 3.737329

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.