YJIT Benchmarks

Details for Benchmarks at 2024-02-05 06:08:17 UTC

YJIT metrics from the yjit-bench suite using Ruby 3af47f14d4

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 69.1% faster than CRuby 3.4.0dev
On railsbench it is
  • 71.0% 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 495 30 495
chunky-png 30 31 30 31
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 354 30 354
liquid-compile 30 341 30 341
liquid-render 30 250 30 250
lobsters 30 22 30 22
mail 30 164 30 164
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 178 30 178
ruby-lsp 30 213 30 213
sequel 30 291 30 291
binarytrees 30 83 30 83
blurhash 30 100 30 100
erubi 30 75 30 75
etanni 30 52 30 52
fannkuchredux 30 24 30 24
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 33 30 33
lee 30 20 30 20
matmul 30 18 30 18
nbody 30 310 30 310
nqueens 30 304 30 304
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 40 30 40
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 1441 30 1441
ruby-xor 30 83 30 83
setivar 30 1668 30 1668
setivar_object 30 301 30 301
setivar_young 30 361 30 361
str_concat 30 418 30 418
throw 30 842 30 842

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) 854092 774485 49 540 0 0% 0 0 0 15.914778
chunky-png (click) 321612 279837 87 1104 1 0% 0 0 0 32.746743
erubi-rails (click) 1666448 1474604 280 2893 6 0% 0 0 0 81.86684
hexapdf (click) 1363097 1143105 596 12407 37 0% 0 0 0 365.86329
liquid-c (click) 498023 423643 119 1762 5 0% 0 0 0 48.76361
liquid-compile (click) 427129 382453 151 2053 2 0% 0 0 0 63.017418
liquid-render (click) 602882 516207 143 2269 8 0% 0 0 0 63.141401
lobsters (click) 7545752 6559558 3224 50057 72 0% 0 0 0 1688.81905
mail (click) 702617 627532 345 4833 14 0% 0 0 0 141.757752
psych-load (click) 284569 247878 65 651 3 0% 0 0 0 20.496728
railsbench (click) 2902279 2558733 1642 15551 54 0% 0 0 0 450.459327
rubocop (click) 4953674 4167794 2901 44349 100 0% 4 0 0 1339.428142
ruby-lsp (click) 618831 541634 159 2792 14 0% 0 0 0 79.258566
sequel (click) 474274 404166 16 117 0 0% 0 0 0 4.4663
binarytrees (click) 9143 8108 11 75 0 0% 0 0 0 2.96562
blurhash (click) 51449 50179 32 478 0 0% 0 0 0 15.76602
erubi (click) 257365 240498 10 114 0 0% 0 0 0 3.887499
etanni (click) 31551 30158 12 98 0 0% 0 0 0 3.344116
fannkuchredux (click) 24892 26732 9 259 0 0% 0 0 0 8.029641
fluentd (click) 371308 328581 11 111 0 0% 0 0 0 3.638417
graphql (click) 422761 350412 70 668 0 0% 0 0 0 20.723824
graphql-native (click) 389208 344294 42 273 0 0% 0 0 0 9.126957
lee (click) 300606 257516 49 734 0 0% 0 0 0 23.359944
matmul (click) 12467 4614 12 126 0 0% 0 0 0 4.262255
nbody (click) 15120 16376 11 187 0 0% 0 0 0 5.117973
nqueens (click) 23567 27084 10 263 0 0% 0 0 0 7.931489
optcarrot (click) 312040 304710 194 4321 34 0% 0 0 0 103.097567
rack (click) 257616 220707 31 322 0 0% 0 0 0 9.26068
ruby-json (click) 27898 25598 12 202 0 0% 0 0 0 6.175197
rubykon (click) 131010 79614 145 1502 3 0% 0 0 0 42.271779
sudoku (click) 46746 38099 11 507 0 0% 0 0 0 15.346076
tinygql (click) 295802 251357 63 792 5 0% 0 0 0 22.856718
30k_ifelse (click) 4909290 4374633 9264 50815 0 0% 0 0 0 1405.725013
30k_methods (click) 1850186 1594311 5782 19371 0 0% 0 0 0 499.633592
cfunc_itself (click) 7580 6763 9 72 0 0% 0 0 0 2.447287
fib (click) 4896 5000 8 49 0 0% 0 0 0 1.874278
getivar (click) 6031 6390 8 74 0 0% 0 0 0 2.325569
keyword_args (click) 8193 6972 10 74 0 0% 0 0 0 2.615927
respond_to (click) 8323 191 9 87 0 0% 0 0 0 2.856724
ruby-xor (click) 7503 7326 9 81 0 0% 0 0 0 2.600588
setivar (click) 5182 4971 8 54 0 0% 0 0 0 1.958314
setivar_object (click) 5520 4991 8 54 0 0% 0 0 0 1.965525
setivar_young (click) 6287 5780 9 62 0 0% 0 0 0 2.160015
str_concat (click) 7845 7725 11 87 0 0% 0 0 0 2.940794
throw (click) 7575 6432 10 69 0 0% 0 0 0 2.38446

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.