YJIT Benchmarks

Details for Benchmarks at 2024-12-02 03:49:19 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 88.9% faster than CRuby 3.4.0dev
  • 4.9% faster than YJIT 3.3.6
On railsbench it is
  • 96.7% faster than CRuby 3.4.0dev
  • 5.3% 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 83 5 84 50 154 50 162
chunky-png 5 32 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 410 5 423 50 585 50 626
liquid-compile 5 412 5 407 50 539 50 560
liquid-render 5 170 5 171 50 402 50 439
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 50 241 50 241
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 249 50 261
ruby-lsp 5 154 5 159 50 259 50 245
sequel 5 419 5 409 50 599 50 570
binarytrees 5 84 5 82 50 144 50 145
blurhash 5 82 5 80 50 127 50 145
erubi 5 75 5 147 50 98 50 142
etanni 5 91 5 100 50 54 50 71
fannkuchredux 5 52 5 54 50 101 50 103
fluentd 5 63 5 63 50 25 50 29
graphql 5 85 5 83 50 57 50 56
graphql-native 5 39 5 52 50 10 50 14
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 52 50 84 50 96
nbody 5 248 5 252 50 577 50 717
nqueens 5 120 5 120 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 178 5 172 50 620 50 746
protoboeuf-encode 5 179 5 197 50 326 50 796
rack 5 577 5 626 50 941 50 1070
ruby-json 5 84 5 83 50 50 50 49
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 47 50 164 50 162
tinygql 5 36 5 38 50 22 50 28
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 339 50 1046 50 1135
fib 5 126 5 127 50 900 50 963
getivar 5 207 5 215 50 2271 50 2616
keyword_args 5 105 5 95 50 959 50 1231
object-new 5 321 5 310 50 404 50 382
respond_to 5 133 5 139 50 3255 50 4033
ruby-xor 5 241 5 250 50 803 50 1382
setivar 5 357 5 357 50 3123 50 5706
setivar_object 5 373 5 341 50 782 50 850
setivar_young 5 373 5 344 50 768 50 842
str_concat 5 402 5 396 50 967 50 1212
throw 5 1259 5 1298 50 1741 50 1704

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) 1495594 1291757 213 2351 0 0% 0 0 67.692343
chunky-png (click) 300845 270154 88 1225 17 1% 0 0 36.258704
erubi-rails (click) 1964086 1612619 264 3078 19 0% 0 0 83.317837
hexapdf (click) 1497210 1222952 599 13991 169 1% 0 0 400.865763
liquid-c (click) 525174 428100 118 1846 5 0% 0 0 52.537934
liquid-compile (click) 449366 356334 150 2211 2 0% 0 0 68.43354
liquid-render (click) 611285 574535 135 2468 12 0% 0 0 69.556484
lobsters (click) 8420709 7020780 3215 54814 189 0% 0 0 1867.23302
mail (click) 793364 735848 347 5588 57 1% 0 0 161.122401
psych-load (click) 285874 251757 65 663 17 2% 0 0 20.589615
railsbench (click) 3356492 2973343 1646 17060 52 0% 0 0 490.24251
rubocop (click) 5890292 4932063 2891 52421 110 0% 4 0 1545.975131
ruby-lsp (click) 857531 772959 309 5004 26 0% 0 0 143.306316
sequel (click) 471940 413909 16 133 55 41% 0 0 5.004409
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.517607
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.700594
erubi (click) 220479 195907 8 113 0 0% 0 0 3.796183
etanni (click) 32243 30528 9 94 0 0% 0 0 3.220518
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.275317
fluentd (click) 379656 324413 10 109 0 0% 0 0 3.799574
graphql (click) 413806 362716 69 695 0 0% 0 0 21.928665
graphql-native (click) 409409 386232 40 270 0 0% 0 0 9.163544
lee (click) 317854 256966 49 848 17 2% 0 0 26.294892
matmul (click) 16519 8883 16 169 4 2% 1 0 5.459123
nbody (click) 19555 23574 14 246 0 0% 1 0 6.643776
nqueens (click) 22324 29548 9 261 4 1% 0 0 7.691971
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 107.641933
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.22904
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.554454
rack (click) 272150 249681 37 424 16 3% 0 0 11.350011
ruby-json (click) 27119 23942 10 187 0 0% 0 0 5.342875
rubykon (click) 146229 126207 144 1628 7 0% 1 0 46.798273
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.304587
tinygql (click) 304010 268265 62 795 20 2% 0 0 23.339796
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1552.101131
30k_methods (click) 2236735 1594956 5782 19373 0 0% 0 0 452.460591
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.523391
fib (click) 8722 8374 11 87 0 0% 1 0 3.007044
getivar (click) 9718 10268 12 114 0 0% 1 0 3.391623
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.667532
object-new (click) 8145 7709 11 85 1 1% 1 0 2.856753
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.276291
ruby-xor (click) 11004 11151 12 122 2 1% 1 0 3.709265
setivar (click) 8869 8944 12 94 0 0% 1 0 3.08683
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.240188
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.391047
str_concat (click) 8820 9220 11 95 3 3% 0 0 3.208201
throw (click) 12065 9846 14 109 0 0% 1 0 3.714002

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.