3 ms·
You don't get it, the language is terrible from a compilation point. I would say designed but that would be an insult to people that actually did/do design lang
by Gibbon1 6y ago
You don't get it, the language is terrible from a compilation point. I would say designed but that would be an insult to people that actually did/do design languages.
You can't actually fix it, you can only make it worse.
Simple point: Adding optimizations doesn't speed C++ compilers up faster than having do those optimizations slows them down.
Solution, stop using C++ for anything.
The most hopeful thing in the last 5 years is the move to remove C++ from new languages tool chains. Good because C++ is hopelessly broken.
- higerordermap 6y ago> Simple point: Adding optimizations doesn't speed C++ compilers up faster than having do those optimizations slows them down. Well that's an obvious point. > Solution, stop using C++ for anything. We can't, realistically. I know rust is great in many aspects. I know lot of software in C++ can be written better even in an AOT'd GC language with equal or better performance, because of so many C++ performance pitfalls that appear at scale. But we can't throw away all the code already written. There is lot of talent pool for C++. And the supposedly better languages have non existent talent pool. (Go doesn't count, such a boilerplate language hampers any readability at scale).
- ncmncm 6y agoI wonder what these "performance pitfalls at scale" are, that other languages succeed in avoiding. Normally such an expression would refer to abstraction overhead, but this is where C++ excels. Cache nonlinearities, with pipeline stalls and branch prediction failures, affect all languages. Control of memory footprint is essential to avoiding those, but C++ exceeds others there, too.