r/programming • • Sep 02 '26

CTTI is Exponential, RTTI is Linear

https://www.gingerbill.org/article/2026/09/02/ctti-is-exponential-rtti-is-linear/
96 Upvotes

90 comments sorted by

View all comments

Show parent comment

3

u/AustinVelonaut Sep 03 '26

Right. Also, polymorphic functions can use a single function signature / implementation if they don't have to worry about different-sized values (e.g. operating on boxed values).

2

u/SelfDistinction Sep 03 '26

Also rust had something similar but it was too complex and added too much compile time for very little benefit.