YJIT Benchmarks

Details for Benchmarks at 2024-11-21 03:47:24 UTC

YJIT metrics from the yjit-bench suite using Ruby af54f0f76d.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 91.9% faster than CRuby 3.4.0dev
  • 5.5% faster than YJIT 3.3.6
On railsbench it is
  • 96.3% faster than CRuby 3.4.0dev
  • 3.9% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 44 minutes
aarch64 runtime: 3 hours, 11 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 84 50 151 50 164
chunky-png 5 31 5 31 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 413 5 426 50 589 50 627
liquid-compile 5 410 5 409 50 548 50 557
liquid-render 5 171 5 170 50 405 50 438
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 193 50 251 50 252
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 155 50 248 50 262
ruby-lsp 5 157 5 142 50 259 50 265
sequel 5 432 5 420 50 601 50 594
binarytrees 5 83 5 83 50 144 50 152
blurhash 5 82 5 80 50 127 50 145
erubi 5 124 5 150 50 99 50 145
etanni 5 91 5 98 50 54 50 70
fannkuchredux 5 52 5 55 50 101 50 106
fluentd 5 63 5 61 50 26 50 31
graphql 5 85 5 84 50 57 50 57
graphql-native 5 40 5 52 50 10 50 14
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 49 50 84 50 99
nbody 5 248 5 247 50 577 50 718
nqueens 5 120 5 118 50 75 50 561
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 175 50 619 50 749
protoboeuf-encode 5 179 5 199 50 326 50 825
rack 5 573 5 620 50 944 50 1076
ruby-json 5 83 5 84 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 162
tinygql 5 36 5 37 50 23 50 27
30k_ifelse 5 28 5 28 50 214 50 194
30k_methods 5 38 5 38 50 482 50 476
cfunc_itself 5 340 5 336 50 1046 50 1136
fib 5 127 5 112 50 900 50 963
getivar 5 207 5 220 50 2266 50 2622
keyword_args 5 104 5 107 50 959 50 1231
object-new 5 321 5 316 50 404 50 393
respond_to 5 133 5 135 50 3254 50 4038
ruby-xor 5 241 5 242 50 804 50 1382
setivar 5 358 5 358 50 3124 50 5712
setivar_object 5 373 5 340 50 781 50 839
setivar_young 5 373 5 353 50 767 50 845
str_concat 5 402 5 377 50 967 50 1196
throw 5 1257 5 1316 50 1735 50 1740

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) 1455290 1258509 213 2351 0 0% 0 0 67.920261
chunky-png (click) 341288 279046 88 1225 17 1% 0 0 36.499532
erubi-rails (click) 1966893 1663470 264 3076 19 0% 0 0 84.087364
hexapdf (click) 1505368 1261453 600 13950 174 1% 0 0 395.645442
liquid-c (click) 498162 421420 119 1852 5 0% 0 0 51.830044
liquid-compile (click) 446031 369793 150 2207 2 0% 0 0 67.8557
liquid-render (click) 603077 517824 136 2474 12 0% 0 0 70.105849
lobsters (click) 8408697 7179959 3215 54757 188 0% 0 0 1839.583452
mail (click) 790699 716547 347 5588 57 1% 0 0 161.916462
psych-load (click) 247836 211954 65 663 17 2% 0 0 20.986504
railsbench (click) 3369144 2854570 1646 17126 52 0% 0 0 492.749954
rubocop (click) 5855656 5106964 2891 52437 110 0% 4 0 1536.869893
ruby-lsp (click) 892829 787966 309 5005 26 0% 0 0 142.723593
sequel (click) 471261 408327 16 133 55 41% 0 0 4.897448
binarytrees (click) 10796 9798 10 89 0 0% 0 0 3.521981
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.605272
erubi (click) 225960 215393 8 113 0 0% 0 0 3.746881
etanni (click) 32243 30528 9 94 0 0% 0 0 3.24981
fannkuchredux (click) 25207 32078 7 271 0 0% 0 0 8.156144
fluentd (click) 355859 303725 10 109 0 0% 0 0 3.767863
graphql (click) 413321 325842 69 695 0 0% 0 0 20.847695
graphql-native (click) 407361 368343 40 270 0 0% 0 0 8.498479
lee (click) 287191 262184 49 848 16 1% 0 0 26.370415
matmul (click) 16519 8883 16 169 4 2% 1 0 5.461663
nbody (click) 19555 23574 14 246 0 0% 1 0 6.578866
nqueens (click) 22324 29548 9 261 4 1% 0 0 7.709284
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 107.821805
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.367255
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.289495
rack (click) 241899 222430 37 424 15 3% 0 0 11.431318
ruby-json (click) 21296 18539 10 187 0 0% 0 0 5.348576
rubykon (click) 146229 126207 144 1628 7 0% 1 0 46.417937
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.341207
tinygql (click) 305683 245255 62 795 20 2% 0 0 22.876622
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1559.117194
30k_methods (click) 2236735 1594956 5782 19373 0 0% 0 0 452.71663
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.495239
fib (click) 5210 5372 7 51 0 0% 0 0 1.966914
getivar (click) 9718 10268 12 114 0 0% 1 0 3.470787
keyword_args (click) 8811 7279 9 74 0 0% 0 0 2.610289
object-new (click) 8145 7709 11 85 1 1% 1 0 2.883692
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.246335
ruby-xor (click) 10978 11066 12 122 2 1% 1 0 3.750755
setivar (click) 8869 8944 12 94 0 0% 1 0 3.109362
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.219027
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.414295
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.267915
throw (click) 12065 9846 14 109 0 0% 1 0 3.693749

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.