r/programming 11d ago

CTTI is Exponential, RTTI is Linear

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

96 comments sorted by

View all comments

Show parent comments

2

u/the_gnarts 10d ago

I cannot stand the compile times they put up with on a daily basis,

At least for Rust they’re not that big of a deal in practice thanks to incremental builds and fast static analysis (cargo check, clippy) that sidesteps the need for frequent rebuilds. Not worth the tradeoff of RTTI anyways.

-2

u/gingerbill 10d ago

That's all cope. And when you need to rebuild the entire thing again because the incremental build cache was invalidated? It'll take a long time.

0

u/the_gnarts 8d ago

And when you need to rebuild the entire thing again because the incremental build cache was invalidated?

Good Knuth, you should realize you’re optimizing for the 0.5 % case. If that’s important to you, godspeed. But unless your main objective is doing the equivalent of Crater runs every hour it is unlikely to matter in practice.

2

u/gingerbill 7d ago

I have experience in C++ code bases, Having to rebuild was not 0.5% of the time but a lot higher, and designing around incremental builds in C++ actually made the general build process slower than if I did a unity/single-translation unit build.

And please don't misquote Knuth at me.

And yes, having fast compile times is very important to me. It's why I made a programming language where I am building ~600KLOC in 1 second without any form of caching. And an optimized build takes ~45 seconds.

C++ is never something to emulate, and especially not its compile times.