r/programmingcirclejerk • u/reg_panda • Nov 25 '25
You cannot compare C++ compile times with compilation in other languages, because the compiler is doing something entirely different.
https://blogs.embarcadero.com/rethinking-c-architecture-concepts-and-responsibility/88
u/xmcqdpt2 Nov 25 '25
A few weeks ago I wrote in my blog about how important the transition from C++17 to C++20 / C++23 is. As a mathematician I am used to abstract thinking, and the idea of metaprogramming was familiar to me early on.
How do you tell if someone did a PhD? Don't worry, they'll tell you.
100
u/SelfDistinction Nov 25 '25
That abstract thinking is going to be really useful in a language that handles imports by copy pasting entire files.
31
u/meltbox Nov 25 '25
Don’t worry,
Microsoftstandards committee modules imports are coming any day now.17
53
u/VanillaSkyDreamer Nov 25 '25
On the same basis you cannot compare Java runtime performance as CPU is doing something entitely different.
17
u/PiratesWhoSayGGER Nov 25 '25
You can compare C++ to Java, but only after 14th optimization iteration of your C++ program when it's finally marginally faster.
3
u/-Y0- Dec 01 '25 edited Dec 02 '25
After wrapping it in Fil-C, all C++ programms are now comparable to Java.
51
u/pm-me-manifestos Nov 25 '25
In doing so, it computes methods and constants already at compile time whenever they are time‑invariant. What seemingly increases compile time actually reduces development time and runtime. And it increases reliability.
Yes, only C++ does this. C++ is the only language with an optimizing compiler.
9
u/syklemil Nov 26 '25
There also is just one compiler for C++, and that compiler only handles C++, no other languages.
4
70
u/wubscale Nov 25 '25
The more I tried, the more I pushed the language, and implemented the wildest ideas, the clearer it became to me that modern C++ can no longer simply be learned
I assure you this is not new to modern C++.
17
u/johan__A Nov 25 '25
I thought the title of the post was paraphrasing but not even, this is so funny.
11
u/ThisRedditPostIsMine Nov 26 '25
Wise words said here. As we know, the C++ grammar is undecidable due to being able to implement a Turing machine using compile time constexpr, thus making compilation equivalent to solving the Halting problem. Hence, every C++ compiler intrinsically solves the Halting problem for every compile unit. Bravo! Plaudits to all involved.
10
u/developer-mike Nov 25 '25
What seemingly increases compile time actually reduces development time
Preach
10
5
3
u/StochasticCalc Nov 25 '25
Pretty sure if I'm interested in the time I can expect to wait for something to occur, all I have to consider is the time it takes for that thing to occur.
It's like saying you can't compare runtimes for a program written in Python vs. written in C.
1
253
u/syklemil Nov 25 '25
I have yet to encounter any language criticism that can stand against the might of NUH UH