YJIT Benchmarks

Details for Benchmarks at 2024-02-04 19:08:15 UTC

YJIT metrics from the yjit-bench suite using Ruby 8bc6fff322

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 69.5% faster than CRuby 3.4.0dev
On railsbench it is
  • 75.6% 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 488 30 488
chunky-png 30 31 30 31
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 350 30 350
liquid-compile 30 342 30 342
liquid-render 30 248 30 248
lobsters 30 22 30 22
mail 30 163 30 163
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 177 30 177
ruby-lsp 30 213 30 213
sequel 30 288 30 288
binarytrees 30 85 30 85
blurhash 30 100 30 100
erubi 30 77 30 77
etanni 30 52 30 52
fannkuchredux 30 23 30 23
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 33 30 33
lee 30 20 30 20
matmul 30 17 30 17
nbody 30 312 30 312
nqueens 30 295 30 295
optcarrot 30 15 30 15
rack 30 179 30 179
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 24 30 24
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 943 30 943
keyword_args 30 533 30 533
respond_to 30 1435 30 1435
ruby-xor 30 85 30 85
setivar 30 1668 30 1668
setivar_object 30 316 30 316
setivar_young 30 374 30 374
str_concat 30 432 30 432
throw 30 825 30 825

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) 853536 774414 49 534 0 0% 0 0 0 16.180636
chunky-png (click) 321612 279837 87 1104 1 0% 0 0 0 32.731636
erubi-rails (click) 1665783 1457556 280 2892 6 0% 0 0 0 81.785164
hexapdf (click) 1365038 1153757 597 12436 37 0% 0 0 0 367.456084
liquid-c (click) 498257 423898 119 1759 5 0% 0 0 0 48.632181
liquid-compile (click) 427891 366654 151 2056 2 0% 0 0 0 63.973257
liquid-render (click) 602882 516207 143 2269 8 0% 0 0 0 63.689534
lobsters (click) 7528355 6429296 3224 49944 72 0% 0 0 0 1681.845333
mail (click) 702617 627500 345 4833 14 0% 0 0 0 143.15814
psych-load (click) 284263 255851 65 649 3 0% 0 0 0 20.41618
railsbench (click) 2908090 2646151 1642 15549 54 0% 0 0 0 448.517101
rubocop (click) 4948320 4164049 2901 44349 100 0% 4 0 0 1338.16189
ruby-lsp (click) 618831 541602 159 2792 14 0% 0 0 0 78.943236
sequel (click) 475575 405396 16 114 0 0% 0 0 0 4.062109
binarytrees (click) 9143 8108 11 75 0 0% 0 0 0 2.971987
blurhash (click) 51449 50179 32 478 0 0% 0 0 0 15.802911
erubi (click) 257365 240498 10 114 0 0% 0 0 0 3.89609
etanni (click) 31551 30158 12 98 0 0% 0 0 0 3.358994
fannkuchredux (click) 24892 26732 9 259 0 0% 0 0 0 8.06533
fluentd (click) 371308 328581 11 111 0 0% 0 0 0 3.64482
graphql (click) 422761 350412 70 668 0 0% 0 0 0 20.841498
graphql-native (click) 389208 344360 42 273 0 0% 0 0 0 9.155196
lee (click) 300606 257516 49 734 0 0% 0 0 0 23.193178
matmul (click) 12467 4614 12 126 0 0% 0 0 0 4.229779
nbody (click) 15120 16376 11 187 0 0% 0 0 0 5.160382
nqueens (click) 23567 27084 10 263 0 0% 0 0 0 7.883247
optcarrot (click) 312040 304710 194 4321 34 0% 0 0 0 103.527016
rack (click) 258933 222581 31 344 0 0% 0 0 0 9.823921
ruby-json (click) 27898 25598 12 202 0 0% 0 0 0 6.176833
rubykon (click) 131010 79614 145 1502 3 0% 0 0 0 42.453933
sudoku (click) 46746 38099 11 507 0 0% 0 0 0 15.322987
tinygql (click) 295802 251357 63 792 5 0% 0 0 0 22.903134
30k_ifelse (click) 4909290 4374633 9264 50815 0 0% 0 0 0 1404.618171
30k_methods (click) 1850186 1594311 5782 19371 0 0% 0 0 0 497.845427
cfunc_itself (click) 7580 6763 9 72 0 0% 0 0 0 2.435628
fib (click) 4896 5000 8 49 0 0% 0 0 0 1.868789
getivar (click) 6031 6390 8 74 0 0% 0 0 0 2.317732
keyword_args (click) 8193 6972 10 74 0 0% 0 0 0 2.611952
respond_to (click) 8323 191 9 87 0 0% 0 0 0 2.861289
ruby-xor (click) 7503 7326 9 81 0 0% 0 0 0 2.598922
setivar (click) 5182 4971 8 54 0 0% 0 0 0 1.938288
setivar_object (click) 5520 4991 8 54 0 0% 0 0 0 1.945853
setivar_young (click) 6287 5780 9 62 0 0% 0 0 0 2.161251
str_concat (click) 7845 7725 11 87 0 0% 0 0 0 2.940261
throw (click) 7575 6432 10 69 0 0% 0 0 0 2.37217

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.