Customization: Optimizing Compiler Technology for SELF, a Dynamically-Typed Object-Oriented Programming Language (1989)

Lobsters Hottest Papers

Summary

1989 paper on the Self language compiler introducing procedure customization by receiver type, speculative type predictions with runtime tests, call splitting, and aggressive inlining — techniques that doubled the performance of dynamically-typed OO languages and later informed modern JITs.

<blockquote> <p>Dynamically-typed object-oriented languages please programmers, but their lack of static type information penalizes performance. Our new implementation techniques extract static type information from declaration-free programs. Our system compiles several copies of a given procedure, each customized for one receiver type, so that the type of the receiver is bound at compile time. The compiler predicts types that are statically unknown but likely, and inserts run-time type tests to verify its predictions. It splits calls, compiling a copy on each control path, optimized to the specific types on that path. Coupling these new techniques with compile-time message lookup, aggressive procedure inlining, and traditional optimizations has doubled the performance of dynamically-typed object-oriented languages.</p> </blockquote> <p><a href="https://dl.acm.org/doi/10.1145/74818.74831" rel="ugc">ACM</a></p> <p><a href="https://lobste.rs/s/dqp0oc/customization_optimizing_compiler">Comments</a></p>
Original Article

Similar Articles

Self-Programmed Execution for Language-Model Agents

arXiv cs.AI

This paper introduces Self-Programmed Execution (SPE), an agent architecture where the language model generates its own orchestration program rather than relying on a fixed external harness. It presents 'Spell', a Lisp-based language enabling this self-editing and re-evaluation, demonstrating that frontier models can successfully perform agentic tasks using this method.

Retrofitting a build system into a compiler

Lobsters Hottest

Lucas Ma has explored using effects in the OCaml compiler to create an on-demand compiler service, allowing for more flexible compilation by inverting control over file lookups and managing global state snapshots.

Why ML/OCaml are good for writing compilers (1998)

Lobsters Hottest

This article from 1998 argues that ML and OCaml are excellent for writing compilers due to features like garbage collection, tail recursion optimization, and algebraic data types with pattern matching, which simplify handling complex compiler data structures.

How to Make a Fast Dynamic Language Interpreter

Hacker News Top

A detailed technical post on optimizing an AST-walking interpreter for Zef, a dynamically-typed language, achieving 16x speedup through value representation, inline caching, object model improvements, and other optimization techniques to reach performance levels competitive with Lua, QuickJS, and CPython.