YJIT Benchmarks

Details for Benchmarks at 2024-10-17 03:45:17 UTC

YJIT metrics from the yjit-bench suite using Ruby 72b8fa9e03

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.9% faster than CRuby 3.4.0dev
  • 4.2% faster than YJIT 3.3.4
On railsbench it is
  • 104.4% faster than CRuby 3.4.0dev
  • 5.3% faster than 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 5 83 5 82 30 178 30 185
chunky-png 5 32 5 31 30 36 30 40
erubi-rails 5 15 5 15 30 15 30 16
hexapdf 5 10 5 10 30 10 30 10
liquid-c 5 424 5 416 30 618 30 641
liquid-compile 5 414 5 417 30 568 30 610
liquid-render 5 171 5 164 30 425 30 444
lobsters 5 20 5 20 30 10 30 10
mail 5 188 5 193 30 264 30 272
psych-load 5 10 5 10 30 10 30 10
railsbench 5 10 5 10 30 10 30 10
rubocop 5 157 5 152 30 271 30 288
ruby-lsp 5 157 5 152 30 264 30 265
sequel 5 422 5 426 30 619 30 622
binarytrees 5 84 5 83 30 170 30 172
blurhash 5 82 5 83 30 148 30 166
erubi 5 113 5 138 30 106 30 138
etanni 5 91 5 100 30 73 30 85
fannkuchredux 5 52 5 55 30 125 30 136
fluentd 5 61 5 65 30 44 30 52
graphql 5 87 5 86 30 79 30 79
graphql-native 5 40 5 53 30 20 30 37
lee 5 23 5 23 30 10 30 12
matmul 5 54 5 55 30 108 30 120
nbody 5 273 5 278 30 640 30 756
nqueens 5 119 5 118 30 92 30 613
optcarrot 5 10 5 10 30 10 30 10
protoboeuf 5 173 5 174 30 638 30 770
protoboeuf-encode 5 179 5 188 30 350 30 813
rack 5 581 5 628 30 975 30 1111
ruby-json 5 86 5 87 30 73 30 74
rubykon 5 21 5 21 30 24 30 29
sudoku 5 48 5 48 30 191 30 205
tinygql 5 37 5 36 30 46 30 45
30k_ifelse 5 28 5 28 30 234 30 212
30k_methods 5 39 5 38 30 502 30 498
cfunc_itself 5 345 5 345 30 1066 30 1155
fib 5 127 5 126 30 918 30 982
getivar 5 206 5 206 30 2286 30 2619
keyword_args 5 108 5 103 30 979 30 1251
object-new 5 321 5 269 30 427 30 325
respond_to 5 137 5 136 30 3278 30 4065
ruby-xor 5 242 5 250 30 824 30 1399
setivar 5 360 5 358 30 3137 30 5736
setivar_object 5 371 5 339 30 807 30 911
setivar_young 5 372 5 342 30 805 30 958
str_concat 5 399 5 404 30 1014 30 1145
throw 5 1288 5 1115 30 1750 30 1423

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) 1476117 1255216 213 2296 0 0% 0 0 65.320862
chunky-png (click) 287471 254871 86 1138 1 0% 0 0 33.935132
erubi-rails (click) 1942992 1713335 248 2878 8 0% 0 0 78.322026
hexapdf (click) 1491154 1328335 597 13847 40 0% 0 0 393.572463
liquid-c (click) 497022 392081 119 1859 5 0% 0 0 51.946555
liquid-compile (click) 417164 341777 150 2210 2 0% 0 0 67.017581
liquid-render (click) 636405 561205 136 2473 12 0% 0 0 69.633846
lobsters (click) 8272336 6936392 3188 53879 181 0% 0 0 1799.972053
mail (click) 760263 667816 346 5481 16 0% 0 0 157.732971
psych-load (click) 249996 204984 64 654 3 0% 0 0 20.556265
railsbench (click) 3304481 2879468 1632 16681 41 0% 0 0 478.365437
rubocop (click) 5812815 4911525 2891 52172 110 0% 4 0 1505.063678
ruby-lsp (click) 852348 760788 308 4986 26 0% 0 0 138.294433
sequel (click) 495254 424547 15 118 0 0% 0 0 4.250548
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.118013
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.150601
erubi (click) 256066 239641 9 108 0 0% 0 0 3.630691
etanni (click) 24711 23355 10 87 0 0% 0 0 3.02507
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.727023
fluentd (click) 375590 319026 10 109 0 0% 0 0 3.853176
graphql (click) 427711 382343 70 700 0 0% 0 0 20.580122
graphql-native (click) 364277 316765 40 270 0 0% 0 0 8.921893
lee (click) 278661 252409 48 803 0 0% 0 0 24.495288
matmul (click) 11838 4563 10 119 0 0% 0 0 3.981429
nbody (click) 15428 19810 9 201 0 0% 0 0 5.375412
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.303873
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 104.389471
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 46.347917
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.049933
rack (click) 268947 237142 36 417 0 0% 0 0 11.093091
ruby-json (click) 27728 24458 11 193 0 0% 0 0 5.597776
rubykon (click) 141526 121537 138 1576 3 0% 0 0 44.880064
sudoku (click) 48090 43120 9 536 0 0% 0 0 16.105112
tinygql (click) 302967 274088 61 787 5 0% 0 0 22.124271
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1567.361079
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 453.499423
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.010062
fib (click) 4041 4120 5 37 0 0% 0 0 1.459376
getivar (click) 5037 6014 6 64 0 0% 0 0 1.876173
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.058914
object-new (click) 3469 3394 5 35 0 0% 0 0 1.496081
respond_to (click) 9866 2524 7 100 0 0% 0 0 2.914309
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.477214
setivar (click) 4188 4690 6 44 0 0% 0 0 1.601419
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.806151
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.94218
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.667878
throw (click) 7384 5592 8 59 0 0% 0 0 2.172207

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.