This article discusses the implementation of a just-in-time compiler (MJIT) for CRuby, which utilizes GCC or LLVM to improve performance for non-input/output-bound programs. MJIT does not use existing compiler JIT interfaces, but instead uses C as an interface language without losing compilation speed. This simplifies JIT implementation, maintenance, and debugging, and makes it independent from a particular C compiler. The article also discusses the advantages and disadvantages of GCC/LLVM-based JITs.
