YJIT Benchmarks

Details for Benchmarks at 2024-02-02 06:08:14 UTC

YJIT metrics from the yjit-bench suite using Ruby c0629a055a

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 68.5% faster than CRuby 3.4.0dev
On railsbench it is
  • 74.2% faster than CRuby 3.4.0dev

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.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 30 479 30 479
chunky-png 30 30 30 30
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 350 30 350
liquid-compile 30 337 30 337
liquid-render 30 248 30 248
lobsters 30 23 30 23
mail 30 164 30 164
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 179 30 179
ruby-lsp 30 210 30 210
sequel 30 283 30 283
binarytrees 30 85 30 85
blurhash 30 102 30 102
erubi 30 77 30 77
etanni 30 52 30 52
fannkuchredux 30 24 30 24
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 32 30 32
lee 30 19 30 19
matmul 30 18 30 18
nbody 30 329 30 329
nqueens 30 303 30 303
optcarrot 30 15 30 15
rack 30 179 30 179
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 26 30 26
tinygql 30 41 30 41
30k_ifelse 30 55 30 55
30k_methods 30 23 30 23
cfunc_itself 30 827 30 827
fib 30 417 30 417
getivar 30 940 30 940
keyword_args 30 533 30 533
respond_to 30 1439 30 1439
ruby-xor 30 82 30 82
setivar 30 1668 30 1668
setivar_object 30 338 30 338
setivar_young 30 369 30 369
str_concat 30 446 30 446
throw 30 818 30 818

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) 852689 773451 49 534 0 0% 0 0 0 16.149599
chunky-png (click) 320760 287065 87 1104 1 0% 0 0 0 32.732497
erubi-rails (click) 1665693 1457043 281 2898 6 0% 0 0 0 81.882381
hexapdf (click) 1363021 1208489 596 12417 37 0% 0 0 0 367.359167
liquid-c (click) 497176 414492 119 1762 5 0% 0 0 0 49.086039
liquid-compile (click) 426507 373383 151 2051 2 0% 0 0 0 63.401998
liquid-render (click) 602046 482382 143 2268 8 0% 0 0 0 63.169007
lobsters (click) 7527338 6507910 3226 49951 72 0% 0 0 0 1680.06432
mail (click) 701770 618305 345 4833 14 0% 0 0 0 142.037161
psych-load (click) 283417 263104 65 649 3 0% 0 0 0 20.317049
railsbench (click) 2900924 2557120 1642 15546 54 0% 0 0 0 449.481768
rubocop (click) 4953331 4201658 2901 44405 100 0% 4 0 0 1346.319803
ruby-lsp (click) 617885 524191 159 2759 14 0% 0 0 0 78.108602
sequel (click) 479329 424563 16 117 0 0% 0 0 0 4.568403
binarytrees (click) 9143 8108 11 75 0 0% 0 0 0 2.996887
blurhash (click) 51449 50179 32 478 0 0% 0 0 0 15.745032
erubi (click) 256513 214958 10 114 0 0% 0 0 0 3.860798
etanni (click) 31551 30158 12 98 0 0% 0 0 0 3.351447
fannkuchredux (click) 24892 26732 9 259 0 0% 0 0 0 8.045519
fluentd (click) 370456 327569 11 111 0 0% 0 0 0 3.806447
graphql (click) 421485 341019 70 668 0 0% 0 0 0 20.768853
graphql-native (click) 388361 343364 42 273 0 0% 0 0 0 9.220788
lee (click) 299759 281153 49 734 0 0% 0 0 0 23.363387
matmul (click) 12467 4614 12 126 0 0% 0 0 0 4.306572
nbody (click) 15120 16376 11 187 0 0% 0 0 0 5.223948
nqueens (click) 23567 27084 10 263 0 0% 0 0 0 7.963101
optcarrot (click) 312040 304710 194 4321 34 0% 0 0 0 103.882546
rack (click) 256769 211524 31 322 0 0% 0 0 0 9.290106
ruby-json (click) 27898 25598 12 202 0 0% 0 0 0 6.246531
rubykon (click) 131364 112626 145 1504 3 0% 0 0 0 42.231253
sudoku (click) 46746 38099 11 507 0 0% 0 0 0 15.184513
tinygql (click) 294955 234034 63 792 5 0% 0 0 0 22.952599
30k_ifelse (click) 4909290 4374633 9264 50815 0 0% 0 0 0 1401.288797
30k_methods (click) 1850186 1594311 5782 19371 0 0% 0 0 0 499.131031
cfunc_itself (click) 7580 6763 9 72 0 0% 0 0 0 2.482281
fib (click) 4896 5000 8 49 0 0% 0 0 0 1.915429
getivar (click) 6031 6390 8 74 0 0% 0 0 0 2.441721
keyword_args (click) 8193 6972 10 74 0 0% 0 0 0 2.647048
respond_to (click) 8323 191 9 87 0 0% 0 0 0 2.881122
ruby-xor (click) 7503 7326 9 81 0 0% 0 0 0 2.637291
setivar (click) 5182 4971 8 54 0 0% 0 0 0 1.963374
setivar_object (click) 5520 4991 8 54 0 0% 0 0 0 2.012782
setivar_young (click) 6287 5780 9 62 0 0% 0 0 0 2.249068
str_concat (click) 7845 7725 11 87 0 0% 0 0 0 2.984898
throw (click) 7575 6432 10 69 0 0% 0 0 0 2.394323

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.