The optimize gem — a hand-rolled
YARV bytecode optimizer for CRuby — plus the companion post and research
for the RubyKaigi 2026 talk Ruby the Hard Way: Writing Bytecode to
Optimize Plain Ruby by Samuel Giddins.
Talk page: https://rubykaigi.org/2026/presentations/segiddins.html
optimizer/— theoptimizegem: IR, codec, passes, harness, demospost.md— long-form companion to the talktalk/— bibliography and referencesresearch/— notes and prior artexperiments/— runnable Ruby experiments (shared Gemfile, numbered subdirs)mcp-server/— local MCP server that runs Ruby in Docker for the harnessdocs/superpowers/— design specs and implementation plans
- Ruby 4.0.2 (see each subproject's
.ruby-version) - Docker Desktop or compatible daemon (for the MCP server)
jjfor version control
cd optimizer && bundle install && bundle exec rake test
cd ../experiments && bundle install
cd ../mcp-server && bundle install && bundle exec rake test
The MCP server is registered via .mcp.json at the repo root; Claude
Code picks it up automatically when started from this directory.