YJIT Benchmarks

Details for Benchmarks at 2024-08-29 21:48:23 UTC

YJIT metrics from the yjit-bench suite using Ruby b1c569c193

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 75.1% faster than CRuby 3.4.0dev
  • 3.9% faster than YJIT 3.3.4
On railsbench it is
  • 80.3% faster than CRuby 3.4.0dev
  • the same speed as 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 50 10 48 10 118 10 123
chunky-png 10 18 10 18 10 36 10 40
erubi-rails 10 10 10 10 10 21 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 347 10 351 10 500 10 510
liquid-compile 10 344 10 346 10 503 10 527
liquid-render 10 139 10 134 10 354 10 367
lobsters 10 14 10 13 10 24 10 23
mail 10 161 10 160 10 239 10 230
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 132 10 234 10 235
ruby-lsp 10 128 10 127 10 217 10 229
sequel 10 323 10 320 10 422 10 432
binarytrees 10 51 10 53 10 118 10 117
blurhash 10 62 10 61 10 120 10 143
erubi 10 84 10 97 10 105 10 123
etanni 10 60 10 65 10 69 10 77
fannkuchredux 10 10 10 10 10 17 10 20
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 29 10 31 10 32 10 35
lee 10 11 10 12 10 20 10 22
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 219 10 421 10 531
nqueens 10 111 10 115 10 113 10 452
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 181 10 183 10 572 10 684
protoboeuf-encode 10 125 10 165 10 283 10 644
rack 10 454 10 482 10 822 10 919
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 28 10 33
tinygql 10 23 10 22 10 51 10 53
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 246 10 255 10 1107 10 1212
fib 10 102 10 101 10 616 10 623
getivar 10 214 10 255 10 1250 10 1761
keyword_args 10 89 10 90 10 730 10 949
object-new 10 229 10 194 10 309 10 240
respond_to 10 91 10 89 10 1785 10 2220
ruby-xor 10 30 10 30 10 92 10 158
setivar 10 348 10 392 10 2320 10 3113
setivar_object 10 216 10 236 10 536 10 514
setivar_young 10 216 10 238 10 528 10 510
str_concat 10 319 10 356 10 658 10 662
throw 10 970 10 824 10 1341 10 1070

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) 1472268 1262600 214 2299 0 0% 0 0 88.042844
chunky-png (click) 319206 271850 82 1090 1 0% 0 0 37.83101
erubi-rails (click) 1761774 1523307 274 3003 6 0% 0 0 107.724915
hexapdf (click) 1392463 1235241 508 12613 40 0% 0 0 449.146636
liquid-c (click) 485097 450540 118 1858 5 0% 0 0 62.340389
liquid-compile (click) 404024 332936 150 2184 2 0% 0 0 77.917094
liquid-render (click) 603738 493165 135 2475 12 0% 0 0 83.870596
lobsters (click) 8168882 6854181 3079 51519 85 0% 0 0 2376.453458
mail (click) 774181 736583 346 5481 16 0% 0 0 188.729123
psych-load (click) 250429 220223 60 615 3 0% 0 0 22.691326
railsbench (click) 3111990 2661853 1636 16748 57 0% 0 0 632.462785
rubocop (click) 5812981 4899924 2892 52178 110 0% 4 0 2025.960074
ruby-lsp (click) 882699 753076 308 4991 26 0% 0 0 175.790288
sequel (click) 455003 406993 15 120 0 0% 0 0 5.649088
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.508854
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.326386
erubi (click) 217971 208071 9 108 0 0% 0 0 4.275719
etanni (click) 28250 26371 10 86 0 0% 0 0 3.32239
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.252766
fluentd (click) 339259 286300 3 22 0 0% 0 0 1.091716
graphql (click) 420200 342008 65 649 0 0% 0 0 23.302399
graphql-native (click) 364915 316678 40 270 0 0% 0 0 10.155744
lee (click) 280419 242495 33 567 0 0% 0 0 20.793414
matmul (click) 7323 8338 6 76 0 0% 0 0 2.981453
nbody (click) 15399 19810 9 201 0 0% 0 0 6.416555
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.296664
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 122.908455
protoboeuf (click) 147776 155834 15 1438 0 0% 0 0 51.956619
protoboeuf-encode (click) 221137 218623 17 1204 0 0% 0 0 37.668589
rack (click) 237916 215658 36 422 0 0% 0 0 13.591006
ruby-json (click) 23921 20995 6 160 0 0% 0 0 5.237915
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.828949
sudoku (click) 44903 40454 6 507 0 0% 0 0 19.118393
tinygql (click) 293388 265402 57 743 5 0% 0 0 24.918688
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 2241.228515
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 544.724136
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.275613
fib (click) 4585 4605 6 42 0 0% 0 0 1.960421
getivar (click) 5037 6014 6 64 0 0% 0 0 2.099835
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.631723
object-new (click) 3469 3394 5 35 0 0% 0 0 1.826596
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.541465
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.754822
setivar (click) 4188 4690 6 44 0 0% 0 0 1.688805
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.856647
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.112981
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.187474
throw (click) 7384 5592 8 59 0 0% 0 0 2.378652

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.