YJIT Benchmarks

Details for Benchmarks at 2024-10-12 04:00:07 UTC

YJIT metrics from the yjit-bench suite using Ruby ad5641fd34

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.2% faster than CRuby 3.4.0dev
  • 3.3% faster than YJIT 3.3.4
On railsbench it is
  • 78.0% faster than CRuby 3.4.0dev
  • 2.1% faster than YJIT 3.3.4

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.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 10 58 10 58 10 144 10 155
chunky-png 10 17 10 17 10 36 10 40
erubi-rails 10 10 10 10 10 22 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 342 10 353 10 487 10 520
liquid-compile 10 347 10 349 10 499 10 536
liquid-render 10 138 10 136 10 356 10 366
lobsters 10 13 10 13 10 24 10 23
mail 10 160 10 164 10 238 10 233
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 135 10 235 10 238
ruby-lsp 10 127 10 129 10 215 10 183
sequel 10 317 10 323 10 428 10 440
binarytrees 10 51 10 50 10 118 10 112
blurhash 10 63 10 62 10 120 10 147
erubi 10 84 10 97 10 102 10 125
etanni 10 59 10 68 10 69 10 81
fannkuchredux 10 59 10 59 10 123 10 135
fluentd 10 37 10 43 10 41 10 45
graphql 10 61 10 62 10 75 10 76
graphql-native 10 29 10 40 10 33 10 47
lee 10 11 10 11 10 20 10 20
matmul 10 38 10 46 10 72 10 83
nbody 10 203 10 220 10 421 10 517
nqueens 10 113 10 119 10 113 10 448
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 160 10 582 10 640
protoboeuf-encode 10 132 10 167 10 295 10 659
rack 10 456 10 503 10 849 10 948
ruby-json 10 64 10 66 10 76 10 78
rubykon 10 13 10 12 10 37 10 39
sudoku 10 48 10 50 10 139 10 158
tinygql 10 23 10 24 10 51 10 52
30k_ifelse 10 26 10 26 10 231 10 206
30k_methods 10 32 10 33 10 343 10 342
cfunc_itself 10 250 10 255 10 1108 10 1212
fib 10 102 10 99 10 616 10 623
getivar 10 214 10 224 10 1253 10 1733
keyword_args 10 90 10 88 10 730 10 946
object-new 10 229 10 187 10 309 10 236
respond_to 10 91 10 89 10 1785 10 2217
ruby-xor 10 186 10 189 10 496 10 841
setivar 10 348 10 419 10 2320 10 3124
setivar_object 10 216 10 229 10 536 10 483
setivar_young 10 216 10 231 10 528 10 480
str_concat 10 319 10 348 10 659 10 664
throw 10 972 10 820 10 1338 10 1029

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) 1449698 1198728 214 2301 0 0% 0 0 74.729452
chunky-png (click) 288304 253024 82 1090 1 0% 0 0 35.26135
erubi-rails (click) 1937536 1707553 245 2790 8 0% 0 0 85.085234
hexapdf (click) 1351584 1160482 507 12564 35 0% 0 0 398.842703
liquid-c (click) 483135 425762 119 1859 5 0% 0 0 56.632907
liquid-compile (click) 440848 339476 150 2201 2 0% 0 0 73.683441
liquid-render (click) 636405 561205 136 2473 12 0% 0 0 76.386073
lobsters (click) 8029603 6714748 3088 51790 181 0% 0 0 1913.16873
mail (click) 751724 709623 346 5481 16 0% 0 0 175.832328
psych-load (click) 252079 242725 60 615 3 0% 0 0 21.301823
railsbench (click) 3298032 2832478 1631 16661 41 0% 0 0 527.255927
rubocop (click) 5814843 4974370 2892 52178 110 0% 4 0 1688.04629
ruby-lsp (click) 848992 716507 308 4991 26 0% 0 0 157.18428
sequel (click) 493443 438773 15 120 0 0% 0 0 5.055799
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.375257
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.658059
erubi (click) 213889 205005 9 108 0 0% 0 0 4.111794
etanni (click) 28241 26371 10 86 0 0% 0 0 3.234467
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.918689
fluentd (click) 376134 319475 11 114 0 0% 0 0 4.406648
graphql (click) 393227 327797 70 700 0 0% 0 0 23.969581
graphql-native (click) 359547 325077 41 275 0 0% 0 0 10.036775
lee (click) 243460 220575 33 567 0 0% 0 0 19.67378
matmul (click) 7323 8338 6 76 0 0% 0 0 2.904785
nbody (click) 15428 19810 9 201 0 0% 0 0 6.023918
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.755031
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 114.394248
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 53.431941
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 36.964535
rack (click) 229787 197765 36 454 0 0% 0 0 13.482259
ruby-json (click) 27649 24400 11 194 0 0% 0 0 6.387045
rubykon (click) 135726 115935 132 1521 3 0% 0 0 48.347553
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.357212
tinygql (click) 265602 223916 57 743 5 0% 0 0 23.821964
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1836.186003
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 532.012986
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.283652
fib (click) 4585 4605 6 42 0 0% 0 0 1.844806
getivar (click) 5037 6014 6 64 0 0% 0 0 2.067694
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.555237
object-new (click) 3469 3394 5 35 0 0% 0 0 1.600019
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.422286
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.80911
setivar (click) 4188 4690 6 44 0 0% 0 0 1.723975
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.850756
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.042342
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.219942
throw (click) 7384 5592 8 59 0 0% 0 0 2.352003

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.