logoalt Hacker News

pettersyesterday at 9:06 PM2 repliesview on HN

> C++ doesn't take longer to compile if you don't abuse templates.

Surprisingly, this is not true. I've written a C++ file only to realize at the end that I did not use any C++ features. Renaming the file to .c halved the compilation time.


Replies

levodelellisyesterday at 9:10 PM

I don't believe you, I measured compile times in c compilers and my own. If you provide more information I'd be more likely to believe you

levodelellisyesterday at 9:34 PM

In fact, I don't believe you so much that I'm willing to say you're full of shit. No compiler capable of both C++ and C will be twice as fast renaming the file to C

show 1 reply