YJIT Benchmarks

Details for Benchmarks at 2024-12-03 03:49:04 UTC

YJIT metrics from the yjit-bench suite using Ruby 8b987ed972.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 91.2% faster than CRuby 3.4.0dev
  • 7.0% faster than YJIT 3.3.6
On railsbench it is
  • 99.5% faster than CRuby 3.4.0dev
  • 3.8% 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 82 5 82 50 128 50 162
chunky-png 5 31 5 32 50 15 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 409 5 423 50 570 50 626
liquid-compile 5 409 5 409 50 544 50 562
liquid-render 5 172 5 168 50 407 50 430
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 193 50 237 50 242
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 252 50 265
ruby-lsp 5 145 5 140 50 248 50 254
sequel 5 418 5 419 50 570 50 586
binarytrees 5 84 5 82 50 144 50 144
blurhash 5 82 5 83 50 127 50 145
erubi 5 116 5 152 50 88 50 150
etanni 5 91 5 99 50 54 50 70
fannkuchredux 5 52 5 54 50 101 50 103
fluentd 5 64 5 63 50 24 50 30
graphql 5 84 5 84 50 57 50 57
graphql-native 5 41 5 52 50 10 50 13
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 52 50 84 50 97
nbody 5 248 5 252 50 577 50 717
nqueens 5 120 5 120 50 74 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 178 5 172 50 620 50 747
protoboeuf-encode 5 180 5 179 50 329 50 819
rack 5 568 5 633 50 939 50 1044
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 37 50 23 50 29
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 38 5 39 50 482 50 477
cfunc_itself 5 342 5 337 50 1046 50 1135
fib 5 127 5 127 50 900 50 963
getivar 5 208 5 216 50 2264 50 2619
keyword_args 5 105 5 95 50 959 50 1231
object-new 5 320 5 311 50 403 50 382
respond_to 5 133 5 139 50 3253 50 4034
ruby-xor 5 242 5 250 50 803 50 1380
setivar 5 358 5 357 50 3122 50 5709
setivar_object 5 374 5 342 50 782 50 853
setivar_young 5 374 5 348 50 767 50 847
str_concat 5 402 5 396 50 964 50 1214
throw 5 1259 5 1296 50 1743 50 1714

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) 1488343 1277152 213 2351 0 0% 0 0 67.386737
chunky-png (click) 317492 275442 88 1225 17 1% 0 0 36.433215
erubi-rails (click) 1986843 1704084 260 3026 15 0% 0 0 82.424412
hexapdf (click) 1535965 1296315 599 13991 174 1% 0 0 399.913023
liquid-c (click) 522826 458821 118 1846 5 0% 0 0 52.728901
liquid-compile (click) 448422 405263 150 2217 2 0% 0 0 68.352623
liquid-render (click) 636747 571260 135 2468 12 0% 0 0 70.257634
lobsters (click) 8411553 7126104 3215 54801 188 0% 0 0 1854.152919
mail (click) 793625 736107 347 5588 57 1% 0 0 160.665666
psych-load (click) 247108 227436 65 661 17 2% 0 0 20.791181
railsbench (click) 3369182 2838889 1645 17113 52 0% 0 0 487.407632
rubocop (click) 5853282 5115167 2891 52419 110 0% 4 0 1543.940488
ruby-lsp (click) 861147 791773 309 5004 26 0% 0 0 142.79113
sequel (click) 499644 441712 16 125 60 48% 0 0 4.325649
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.498792
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.653971
erubi (click) 237533 201556 8 113 0 0% 0 0 3.833897
etanni (click) 32243 30528 9 94 0 0% 0 0 3.198834
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.135842
fluentd (click) 379988 300045 10 109 0 0% 0 0 3.89257
graphql (click) 416460 360418 69 695 0 0% 0 0 21.828366
graphql-native (click) 409409 386196 40 270 0 0% 0 0 9.229689
lee (click) 317854 256966 49 848 17 2% 0 0 26.266988
matmul (click) 16519 8883 16 169 4 2% 1 0 5.496551
nbody (click) 19555 23574 14 246 0 0% 1 0 6.61064
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.659569
optcarrot (click) 328350 312990 191 4555 38 0% 0 0 106.415579
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 46.999863
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.465553
rack (click) 270165 239524 37 424 16 3% 0 0 11.339238
ruby-json (click) 27045 23855 10 189 0 0% 0 0 5.413699
rubykon (click) 146229 126207 144 1628 7 0% 1 0 46.365168
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.348567
tinygql (click) 281887 241433 62 795 20 2% 0 0 22.728411
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1549.927668
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 453.367642
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.55152
fib (click) 8722 8374 11 87 0 0% 1 0 3.035436
getivar (click) 9718 10268 12 114 0 0% 1 0 3.405468
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.618586
object-new (click) 8145 7709 11 85 1 1% 1 0 2.888205
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.252602
ruby-xor (click) 11004 11151 12 122 2 1% 1 0 3.758593
setivar (click) 8869 8944 12 94 0 0% 1 0 3.088275
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.249243
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.391088
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.243958
throw (click) 12065 9846 14 109 0 0% 1 0 3.668208

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.