bench | No JIT (ms) | No JIT RSD | MJIT (ms) | MJIT RSD | YJIT (ms) | YJIT RSD | MJIT spd | MJIT spd RSD | YJIT spd | YJIT spd RSD | % in YJIT |
---|---|---|---|---|---|---|---|---|---|---|---|
activerecord | 152.9 | 0.44% | 175.1 | 4.08% | 103.6 | 0.45% | 0.87x | 4.10% | 1.48x | 0.63% | 85.54% |
hexapdf | 3141.4 | 1.01% | 2362.8 | 1.90% | 1.33x | 2.15% | 83.65% | ||||
liquid-render | 213.2 | 2.38% | 202.7 | 1.39% | 142.9 | 1.65% | 1.05x | 2.76% | 1.49x | 2.89% | 85.70% |
203.2 | 2.00% | 207.8 | 3.05% | 197.9 | 2.40% | 0.98x | 3.65% | 1.03x | 3.12% | 99.38% | |
psych-load | 2764.9 | 0.03% | 2322.2 | 0.15% | 2234.0 | 0.05% | 1.19x | 0.15% | 1.24x | 0.05% | 88.45% |
railsbench | 3118.6 | 0.28% | 3443.6 | 0.42% | 2610.8 | 1.00% | 0.91x | 0.50% | 1.19x | 1.04% | 86.19% |
binarytrees | 476.6 | 0.04% | 310.9 | 0.32% | 364.1 | 0.16% | 1.53x | 0.32% | 1.31x | 0.17% | 84.27% |
chunky_png | 987.8 | 0.31% | 798.2 | 0.65% | 669.7 | 0.53% | 1.24x | 0.72% | 1.47x | 0.61% | 99.95% |
discourse | 583.8 | 15.00% | 621.2 | 14.98% | 524.3 | 18.93% | 0.94x | 21.20% | 1.11x | 24.15% | 74.23% |
erubi | 504.3 | 0.39% | 457.7 | 1.21% | 398.8 | 0.87% | 1.10x | 1.27% | 1.26x | 0.96% | 100.00% |
erubi_rails | 32.4 | 41.46% | 35.5 | 42.51% | 24.8 | 55.11% | 0.91x | 59.38% | 1.31x | 68.96% | 86.31% |
fannkuchredux | 7472.5 | 11.32% | 4016.7 | 0.05% | 8781.5 | 0.20% | 1.86x | 11.32% | 0.85x | 11.32% | 0.02% |
lee | 1211.3 | 2.17% | 1012.6 | 1.79% | 893.5 | 1.36% | 1.20x | 2.81% | 1.36x | 2.56% | 99.97% |
nbody | 122.5 | 1.15% | 72.7 | 0.04% | 90.4 | 0.45% | 1.69x | 1.15% | 1.36x | 1.23% | 100.00% |
optcarrot | 6105.4 | 0.44% | 2578.1 | 0.61% | 3491.3 | 0.60% | 2.37x | 0.75% | 1.75x | 0.74% | 96.13% |
rubykon | 13718.6 | 2.24% | 11531.9 | 1.43% | 7993.2 | 3.35% | 1.19x | 2.66% | 1.72x | 4.03% | 99.80% |
30k_ifelse | 2299.0 | 0.03% | 3689.3 | 3.91% | 357.9 | 0.20% | 0.62x | 3.91% | 6.42x | 0.20% | 100.00% |
30k_methods | 6378.0 | 0.01% | 10096.7 | 15.89% | 882.2 | 0.06% | 0.63x | 15.89% | 7.23x | 0.06% | 100.00% |
cfunc_itself | 101.9 | 0.37% | 72.6 | 2.26% | 44.8 | 0.94% | 1.40x | 2.29% | 2.27x | 1.01% | 100.00% |
fib | 245.4 | 0.05% | 86.1 | 0.03% | 62.5 | 0.57% | 2.85x | 0.06% | 3.93x | 0.57% | 100.00% |
getivar | 106.4 | 0.50% | 26.3 | 67.40% | 42.6 | 0.73% | 4.04x | 67.40% | 2.50x | 0.89% | 99.21% |
keyword_args | 286.9 | 0.09% | 226.1 | 0.28% | 53.1 | 0.68% | 1.27x | 0.29% | 5.41x | 0.68% | 100.00% |
respond_to | 270.2 | 0.43% | 223.4 | 0.61% | 189.1 | 0.31% | 1.21x | 0.74% | 1.43x | 0.53% | 100.00% |
setivar | 77.7 | 0.40% | 10.8 | 101.59% | 50.5 | 0.72% | 7.20x | 101.60% | 1.54x | 0.82% | 99.55% |
str_concat | 130.2 | 0.85% | 99.4 | 1.32% | 108.3 | 1.47% | 1.31x | 1.57% | 1.20x | 1.70% | 99.68% |
RSD is relative standard deviation - the standard deviation divided by the mean, expressed as a percentage.
% in YJIT is the percentage of instructions that complete in YJIT rather than exiting to the non-JITted interpreter. YJIT performs better when this is higher.
Speedup is relative to interpreted CRuby. So an "MJIT speedup" of 1.21x means MJIT runs at 1.21 times the iters/second of CRuby with JIT disabled.
You can find our benchmark code in the yjit-bench Github repo and the yjit-extra-benchmarks Github repo.
Our benchmark-runner and reporting code is in the yjit-metrics Github repo.
Tested Ruby version for YJIT and No-JIT: ruby 3.2.0dev (2022-05-26T19:09:04Z master 33fdff3c30) +YJIT [x86_64-linux]
Tested Ruby version for Ruby latest MJIT: ruby 3.2.0dev (2022-05-26T19:09:04Z master 33fdff3c30) +MJIT [x86_64-linux]