Everything about Monomorphization
Compile-time transformation
In programming languages, monomorphization is a compile-time process where polymorphic functions are replaced by many monomorphic functions for each unique instantiation. It is considered beneficial to undergo the mentioned transformation because it results in the output intermediate representation (IR) having specific types, which allows for more effective optimization. Additionally, many IRs are intended to be low-level and do not accommodate polymorphism. The resulting code is generally faster than dynamic dispatch, but may require more compilation time and storage space due to duplicating the function body. Wikipedia →
🧭 Start here: a 6-step reading path
- Read the overview: MonomorphizationA 5-minute orientation
- Pick up a classic book: Clinical arrhythmology and electrophysiologyThe most-reprinted book on the subject
- Read the landmark paper: Safe Low-level Code Generation in Coq Using Monomorphization and MonadificationCited 8 times
- Go sideways: Rust syntaxA closely related topic
- Go sideways: Rust (programming language)A closely related topic
📖 Definitions
Noun Alternative spelling of monomorphisation.
🗂️ The subject at a glance
🏆 Landmark papers (most cited)
📚 Books worth reading
Clinical arrhythmology and electrophysiologyZiad Issa · 2008
Real World HaskellBryan O'Sullivan, John Goerzen · 2008
Making sense of heritabilityNeven Sesardić · 2005- 📕Genetic recombinationAlan S. Waldman · 2004
Tools and Algorithms for the Construction and Analysis of SystemsNir Piterman · 2013- 📕Self-fertility in monomorphic PrimulasAlfred Ernst · 1955
- 📕Dimorphism and monomorphism in the PlumbaginaceaeHerbert G. Baker · 1953
- 📕Monomorphe overgangen in de kristalstructuren van zilverkwikjodide, aluminiumfloride en natriumnitraatJan Arnold Albert Ketelaar · 1933
Ranked by number of editions on Open Library, a rough measure of how lasting a book is.
🔗 Related topics
- Rust syntax The syntax of Rust is the set of rules defining how a Rust program is written and compiled. Rust's syntax is similar to that of C and C++, although many…
- Rust (programming language) Rust is a general-purpose programming language that emphasizes performance, type safety, concurrency, and memory safety. Rust supports multiple programming…
- Option type In programming languages (especially functional programming languages) and type theory, an option type or maybe type is a polymorphic type that represents…
- Compile-time function execution In computing, compile-time function execution (or compile-time function evaluation, or general constant expressions) is the ability of a compiler, that…
- Attribute (programming) In object-oriented programming, an attribute is a specification that defines a property of an object, element, or file. It may also refer to or set the…
- Static dispatch In computing, static dispatch is a form of polymorphism fully resolved during compile time. It is a form of method dispatch, which describes how a language…
- Bounded quantification In type theory, bounded quantification (also bounded polymorphism or constrained genericity) refers to universal or existential quantifiers which are restricted…
- Polymorphism (computer science) In programming language theory and type theory, polymorphism allows a value or variable to have more than one type and allows a given operation to be performed…