YJIT Benchmarks

Details for Benchmarks at 2024-11-30 03:47:03 UTC

YJIT metrics from the yjit-bench suite using Ruby 660b995365.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 89.1% faster than CRuby 3.4.0dev
  • 5.7% faster than YJIT 3.3.6
On railsbench it is
  • 90.0% faster than CRuby 3.4.0dev
  • 3.2% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 44 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 81 5 84 50 151 50 163
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 406 5 425 50 563 50 626
liquid-compile 5 408 5 404 50 542 50 554
liquid-render 5 170 5 168 50 409 50 436
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 185 50 238 50 250
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 156 50 250 50 264
ruby-lsp 5 155 5 157 50 256 50 248
sequel 5 416 5 418 50 581 50 585
binarytrees 5 84 5 82 50 144 50 144
blurhash 5 82 5 83 50 127 50 145
erubi 5 116 5 152 50 89 50 150
etanni 5 91 5 100 50 54 50 70
fannkuchredux 5 52 5 55 50 101 50 104
fluentd 5 63 5 64 50 24 50 22
graphql 5 85 5 86 50 56 50 57
graphql-native 5 40 5 52 50 10 50 14
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 84 50 96
nbody 5 248 5 253 50 577 50 718
nqueens 5 120 5 121 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 173 50 620 50 745
protoboeuf-encode 5 179 5 198 50 328 50 791
rack 5 576 5 634 50 946 50 1039
ruby-json 5 83 5 84 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 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 39 5 38 50 483 50 474
cfunc_itself 5 342 5 342 50 1046 50 1135
fib 5 126 5 128 50 900 50 963
getivar 5 208 5 218 50 2270 50 2622
keyword_args 5 104 5 104 50 959 50 1231
object-new 5 321 5 312 50 403 50 374
respond_to 5 133 5 139 50 3253 50 4031
ruby-xor 5 242 5 241 50 804 50 1379
setivar 5 358 5 357 50 3123 50 5705
setivar_object 5 373 5 341 50 780 50 849
setivar_young 5 374 5 344 50 767 50 847
str_concat 5 407 5 394 50 969 50 1212
throw 5 1260 5 1313 50 1741 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) 1470158 1255253 213 2351 0 0% 0 0 73.167056
chunky-png (click) 325916 283565 88 1230 17 1% 0 0 36.594338
erubi-rails (click) 1987646 1640020 264 3078 19 0% 0 0 84.449797
hexapdf (click) 1514790 1254767 599 13992 169 1% 0 0 399.342998
liquid-c (click) 519796 448418 118 1846 5 0% 0 0 52.119302
liquid-compile (click) 418508 359205 150 2197 2 0% 0 0 67.335393
liquid-render (click) 637057 522418 135 2468 12 0% 0 0 69.646355
lobsters (click) 8437954 7138406 3214 54958 189 0% 0 0 1868.050323
mail (click) 758423 706557 347 5588 57 1% 0 0 161.628973
psych-load (click) 258371 224874 65 663 16 2% 0 0 20.650409
railsbench (click) 3366826 2834853 1646 17055 52 0% 0 0 519.244603
rubocop (click) 5860949 5030857 2891 52379 110 0% 4 0 1550.450208
ruby-lsp (click) 893587 788512 309 5005 26 0% 0 0 142.66115
sequel (click) 499666 457007 16 125 59 47% 0 0 4.748268
binarytrees (click) 14397 12917 14 126 0 0% 1 0 4.591903
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.726519
erubi (click) 244299 216386 8 113 0 0% 0 0 3.800276
etanni (click) 32243 30528 9 94 0 0% 0 0 3.221597
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.271758
fluentd (click) 354059 296099 10 109 0 0% 0 0 3.778321
graphql (click) 425575 369165 69 695 0 0% 0 0 21.569891
graphql-native (click) 404775 365600 40 270 0 0% 0 0 9.099037
lee (click) 289806 262408 49 848 16 1% 0 0 26.248977
matmul (click) 13007 5881 12 133 4 3% 0 0 4.436675
nbody (click) 19555 23574 14 246 0 0% 1 0 6.618588
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.793077
optcarrot (click) 328350 312990 191 4555 38 0% 0 0 103.947644
protoboeuf (click) 163798 155564 15 1616 0 0% 0 0 45.922709
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.581022
rack (click) 268945 205615 37 424 16 3% 0 0 11.292363
ruby-json (click) 27045 23855 10 188 0 0% 0 0 5.412078
rubykon (click) 146229 126207 144 1628 7 0% 1 0 46.618867
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.342698
tinygql (click) 289060 248531 62 795 20 2% 0 0 23.223258
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1560.779879
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 453.058579
cfunc_itself (click) 8081 6806 9 76 0 0% 0 0 2.487224
fib (click) 8722 8374 11 87 0 0% 1 0 2.99654
getivar (click) 9718 10268 12 114 0 0% 1 0 3.438449
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.625265
object-new (click) 8145 7709 11 85 1 1% 1 0 2.895745
respond_to (click) 10491 3291 8 109 0 0% 0 0 3.218989
ruby-xor (click) 7492 8149 8 86 2 2% 0 0 2.684605
setivar (click) 8869 8944 12 94 0 0% 1 0 3.144065
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.209753
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.421158
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.376631
throw (click) 12065 9846 14 109 0 0% 1 0 3.685953

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.