The AST Galaxy to the Virtual Machine Blues

Ruby has long relied on virtual machines for performance, but their growing complexity can sometimes feel like the "virtual machine blues." In this talk, I introduce ASTro, an AST-based reusable optimization framework, and share an experiment in reimplementing Ruby using this new approach.

Before Ruby 1.9, Ruby programs were executed by directly traversing their AST. While modern Ruby implementations have moved to bytecode VMs and JIT compilers, this talk revisits AST-based execution with today’s techniques by rebuilding parts of Ruby on top of ASTro.

Using ASTro, Ruby programs are optimized and compiled at the AST level, generating C source code and producing efficient native code. This is a research-stage experiment rather than a production proposal, and the talk focuses on what worked, what did not, and what we learned from the attempt.

  • Koichi Sasada
    Koichi Sasada

    Koichi Sasada is a programmer, mainly developing Ruby interpreter (CRuby/MRI). He received Ph.D (Information Science and Technology) from the University of Tokyo, 2007. He is currently developing a Ruby interpreter at STORES, Inc (2023-). He is also a director of Ruby Association.