This fixes a few warning: instance variable @halt not initialized warnings (seen when running with -w).
It also boosts performance significantly for TruffleRuby, because the set of instance variables is now stable in that class (instead of having many different variants).
With this, I get ~375FPS on Tetris with TruffleRuby master running in --jvm mode!
(truffleruby 20.2.0-dev-a9555582, like ruby 2.6.5, GraalVM CE JVM [x86_64-linux])
For comparison, on my machine Tetris on MRI 2.6.6 is ~50FPS, and ~77FPS with --jit.
On MRI 2.7.1 it's ~55FPS, and ~95FPS with --jit.
This fixes a few
warning: instance variable @halt not initialized
warnings (seen when running with-w
).It also boosts performance significantly for TruffleRuby, because the set of instance variables is now stable in that class (instead of having many different variants).
With this, I get ~375FPS on Tetris with TruffleRuby
master
running in--jvm
mode! (truffleruby 20.2.0-dev-a9555582, like ruby 2.6.5, GraalVM CE JVM [x86_64-linux]
) For comparison, on my machine Tetris on MRI 2.6.6 is ~50FPS, and ~77FPS with--jit
. On MRI 2.7.1 it's ~55FPS, and ~95FPS with--jit
.