YJIT Benchmarks

Details for Benchmarks at 2024-12-04 03:48:45 UTC

YJIT metrics from the yjit-bench suite using Ruby 59f7a5d336.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.3% faster than CRuby 3.4.0dev
  • 3.3% faster than YJIT 3.3.6
On railsbench it is
  • 94.0% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 20 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 156 50 163
chunky-png 5 32 5 32 50 16 50 34
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 422 50 563 50 630
liquid-compile 5 408 5 407 50 540 50 555
liquid-render 5 172 5 168 50 404 50 438
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 50 250 50 244
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 149 5 153 50 249 50 262
ruby-lsp 5 161 5 151 50 258 50 198
sequel 5 432 5 421 50 595 50 588
binarytrees 5 84 5 81 50 144 50 143
blurhash 5 82 5 83 50 127 50 145
erubi 5 75 5 146 50 29 50 149
etanni 5 91 5 99 50 54 50 70
fannkuchredux 5 52 5 54 50 101 50 104
fluentd 5 64 5 60 50 26 50 22
graphql 5 85 5 84 50 57 50 56
graphql-native 5 39 5 52 50 10 50 15
lee 5 23 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 64
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 172 5 172 50 618 50 746
protoboeuf-encode 5 180 5 196 50 326 50 824
rack 5 573 5 632 50 949 50 1068
ruby-json 5 84 5 83 50 49 50 50
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 47 50 164 50 162
tinygql 5 36 5 37 50 22 50 29
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 39 5 38 50 480 50 474
cfunc_itself 5 342 5 336 50 1046 50 1135
fib 5 126 5 127 50 901 50 963
getivar 5 207 5 216 50 2262 50 2621
keyword_args 5 105 5 95 50 959 50 1231
object-new 5 320 5 311 50 403 50 381
respond_to 5 133 5 139 50 3255 50 4036
ruby-xor 5 241 5 250 50 801 50 1380
setivar 5 358 5 357 50 3126 50 5708
setivar_object 5 374 5 341 50 779 50 848
setivar_young 5 373 5 344 50 767 50 849
str_concat 5 401 5 396 50 963 50 1208
throw 5 1260 5 1296 50 1744 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) 1462714 1271096 213 2351 0 0% 0 0 68.197963
chunky-png (click) 342717 312960 88 1225 17 1% 0 0 36.418791
erubi-rails (click) 1961166 1658372 263 3069 19 0% 0 0 83.920105
hexapdf (click) 1506035 1253978 600 13995 173 1% 0 0 402.013025
liquid-c (click) 499910 415103 118 1846 5 0% 0 0 50.662855
liquid-compile (click) 414136 336235 150 2215 2 0% 0 0 68.366519
liquid-render (click) 637968 555854 135 2468 12 0% 0 0 70.315261
lobsters (click) 8432993 7099679 3215 55008 189 0% 0 0 1885.141296
mail (click) 787434 738532 347 5588 57 1% 0 0 161.152506
psych-load (click) 265490 218967 65 663 17 2% 0 0 20.79254
railsbench (click) 3370697 2918221 1645 17039 52 0% 0 0 489.579372
rubocop (click) 5849597 5029637 2891 52377 110 0% 4 0 1536.846051
ruby-lsp (click) 860045 733373 309 5005 26 0% 0 0 142.063168
sequel (click) 503642 451453 16 133 54 40% 0 0 4.956897
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.526245
blurhash (click) 58305 50994 31 515 1 0% 0 0 16.689184
erubi (click) 237189 216922 8 113 0 0% 0 0 3.788416
etanni (click) 28736 27536 10 98 0 0% 0 0 3.343041
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.191291
fluentd (click) 379238 307710 10 109 0 0% 0 0 3.784838
graphql (click) 409128 336915 69 695 0 0% 0 0 21.709516
graphql-native (click) 407980 335836 40 270 0 0% 0 0 9.178745
lee (click) 318617 273876 49 848 17 2% 0 0 26.25524
loops-times (click) 12905 12894 13 133 1 0% 1 0 4.259353
matmul (click) 13007 5881 12 133 4 3% 0 0 4.447526
nbody (click) 16058 20577 10 210 0 0% 0 0 5.597794
nqueens (click) 22324 29548 9 261 4 1% 0 0 7.701777
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 108.037472
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.071623
protoboeuf-encode (click) 234990 231148 17 1255 0 0% 0 0 32.486049
rack (click) 241899 222430 37 424 15 3% 0 0 11.61959
ruby-json (click) 21296 18539 10 187 0 0% 0 0 5.381236
rubykon (click) 142727 123210 140 1592 7 0% 0 0 45.436664
sudoku (click) 48458 36262 10 544 7 1% 0 0 16.381149
tinygql (click) 307521 246742 62 795 20 2% 0 0 22.972636
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1559.002854
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 453.827075
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.510207
fib (click) 5210 5372 7 51 0 0% 0 0 1.982515
getivar (click) 6206 7266 8 78 0 0% 0 0 2.397522
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.612226
object-new (click) 4638 4712 7 49 1 2% 0 0 1.844926
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.292683
ruby-xor (click) 7492 8149 8 86 2 2% 0 0 2.712116
setivar (click) 5357 5942 8 58 0 0% 0 0 2.0827
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.229274
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.418291
str_concat (click) 8820 9220 11 95 3 3% 0 0 3.247637
throw (click) 12065 9846 14 109 0 0% 1 0 3.727268

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.