Eliminating Shim Methods via Method Rewriting in LowType
LowType currently relies on shim methods to bypass type checking when disabled, adding persistent runtime overhead on every method call through define_method closures and repeated Lowkey proxy lookups. This project eliminates that overhead entirely by rewriting typed methods directly onto the class using class_eval, producing plain untyped Ruby methods indistinguishable from hand-written code. Deliverables include removal of the shim execution path, class_eval based method rewriting integrated with Lowkey export methods, edge case handling for kwargs and defaults, benchmark results using benchmark-ips, and full test and documentation coverage. A working prototype already exists with real benchmark results showing 1.8 to 2x improvement over the current shim.
Project details
Technologies
Not listed in the archive