Generics in Rust with Monomorphization
Generics in Rust is not like in any other mainstream programming language except for C++ and uses something called Monomorphization. This approach is fantastic since it is basically zero cost.
3 posts
Generics in Rust is not like in any other mainstream programming language except for C++ and uses something called Monomorphization. This approach is fantastic since it is basically zero cost.
An exploration of the "dyn" keyword in Rust, trait objects, and how they enable polymorphism through dynamic dispatch.
Zero cost abstraction is a fancy term that simply means that adding high-level constructs like a newtype, type class or generics do not contribute to any runtime cost.