Efficient Ruby to Javascript Compilation and Applications
summary
A Ruby to JavaScript compiler called Ruby GS converts real Ruby semantics into faster JS by choosing tradeoffs: name mangling to shrink output, a variadic call convention to avoid allocating argument arrays (fixed calls are around two times slower), custom JS hash objects versus native object maps, and mapping Ruby strings to immutable JS strings to save memory. A partial port of Google Web Toolkit as Ruby Web Toolkit is about 30% complete; testing compiles the same Ruby file to Ruby and JS and compares outputs.
AI-written summary · about








