The author discusses the creation of a minimalistic Ruby compiler designed for a cross-platform game engine that focuses on indie developers. The compiler is based on MLIR and targets C language instead of machine code, with the goal of pre-compiling Ruby code to improve performance. By eliminating load/stores and branches in the VM dispatch loop, the compiled code shows promising speedups in benchmarks. However, not all language features are currently supported due to the simplified approach of the compiler. The author plans to further optimize the compiler and potentially replace critical C components with compiled Ruby code in the game engine.
https://blog.llvm.org/posts/2024-12-03-minimalistic-ruby-compiler/