CTTI is Exponential, RTTI is Linear

· · Sept. 2, 2026, 9:52 p.m.
Summary
This blog post discusses the differences in cost between Compile-Time Type Information (CTTI) and Runtime Type Information (RTTI), highlighting that while RTTI has a linear cost based on the number of types, CTTI presents a more complex cost structure often misleadingly marketed as 'zero-cost'. The post argues that RTTI incurs minimal additional expense during semantic checking, making a case for a deeper understanding of type information in programming.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →
BLOG POST FEATURED ON

Add this plugin to your blog