YJIT Benchmarks

Details for Benchmarks at 2024-04-25 06:08:17

Overall YJIT is 68.8% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 81.7% faster than CRuby!

The basic "faster" measurement is the geomean of all "headlining" x86 benchmarks on this page.

Headlining Benchmarks

These are "headlining" because the "overall" speedup above is based on these benchmarks specifically.

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

Other Benchmarks

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

MicroBenchmarks

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Benchmark Memory Usage Details

Number of Iterations and Warmups Tested

bench No JIT warmups No JIT iters YJIT warmups YJIT iters
activerecord 30 514 30 514
chunky-png 30 31 30 31
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 345 30 345
liquid-compile 30 337 30 337
liquid-render 30 247 30 247
lobsters 30 23 30 23
mail 30 161 30 161
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 181 30 181
ruby-lsp 30 177 30 177
sequel 30 288 30 288
binarytrees 30 84 30 84
blurhash 30 99 30 99
erubi 30 75 30 75
etanni 30 24 30 24
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 312 30 312
nqueens 30 309 30 309
optcarrot 30 15 30 15
protoboeuf 30 393 30 393
rack 30 178 30 178
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 25 30 25
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 416 30 416
getivar 30 943 30 943
keyword_args 30 591 30 591
respond_to 30 1480 30 1480
ruby-xor 30 97 30 97
setivar 30 2393 30 2393
setivar_object 30 354 30 354
setivar_young 30 388 30 388
str_concat 30 409 30 409
throw 30 793 30 793

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
activerecord (click) 885878 770119 49 526 0 0% 0 0
chunky-png (click) 337053 281985 87 1094 1 0% 0 0
erubi-rails (click) 1699098 1402643 277 2948 6 0% 0 0
hexapdf (click) 1415252 1232168 595 12692 38 0% 0 0
liquid-c (click) 522197 437154 119 1757 5 0% 0 0
liquid-compile (click) 439349 374225 151 2065 2 0% 0 0
liquid-render (click) 616435 542255 136 2292 8 0% 0 0
lobsters (click) 7858896 6490987 3212 51148 73 0% 0 0
mail (click) 730555 608629 346 4865 14 0% 0 0
psych-load (click) 301454 252936 65 658 3 0% 0 0
railsbench (click) 2990162 2546748 1634 15921 54 0% 0 0
rubocop (click) 5373375 4582977 2901 48283 109 0% 4 0
ruby-lsp (click) 630782 554652 159 2794 14 0% 0 0
sequel (click) 494922 418167 16 118 0 0% 0 0
binarytrees (click) 9384 7556 11 75 0 0% 0 0
blurhash (click) 51756 46977 32 460 0 0% 0 0
erubi (click) 270262 237443 10 112 0 0% 0 0
etanni (click) 29895 26052 11 91 0 0% 0 0
fannkuchredux (click) 24443 9175 9 257 0 0% 0 0
fluentd (click) 377946 329469 11 111 0 0% 0 0
graphql (click) 438187 370117 70 685 0 0% 0 0
graphql-native (click) 405240 341784 42 278 0 0% 0 0
lee (click) 316265 260791 49 737 0 0% 0 0
matmul (click) 12555 12107 12 126 0 0% 0 0
nbody (click) 15072 7506 11 185 0 0% 0 0
nqueens (click) 23358 17741 10 260 0 0% 0 0
optcarrot (click) 313653 276483 192 4326 34 0% 0 0
protoboeuf (click) 153148 132196 17 1378 0 0% 0 0
rack (click) 272399 234253 31 326 0 0% 0 0
ruby-json (click) 33192 28025 12 196 0 0% 0 0
rubykon (click) 134790 115490 143 1512 3 0% 0 0
sudoku (click) 46784 53075 11 507 0 0% 0 0
tinygql (click) 313143 257403 63 787 5 0% 0 0
30k_ifelse (click) 5222589 4374204 9264 50813 0 0% 0 0
30k_methods (click) 2019606 1594020 5782 19369 0 0% 0 0
cfunc_itself (click) 7581 5778 9 70 0 0% 0 0
fib (click) 5009 4601 8 49 0 0% 0 0
getivar (click) 6094 5991 8 74 0 0% 0 0
keyword_args (click) 8464 6470 10 72 0 0% 0 0
respond_to (click) 8333 7728 9 85 0 0% 0 0
ruby-xor (click) 8062 6902 9 87 0 0% 0 0
setivar (click) 5185 4572 8 54 0 0% 0 0
setivar_object (click) 5553 4592 8 54 0 0% 0 0
setivar_young (click) 6276 5242 9 62 0 0% 0 0
str_concat (click) 7876 7217 11 85 0 0% 0 0
throw (click) 7938 6033 10 69 0 0% 0 0

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.