3 ms·
> Firstly, let's dismiss this idea that C++ can avoid wasting a single cycle or byte, it doesn't aim for that. It aims for a much lower bar, albeit still a sign
by simplestats 5y ago
> Firstly, let's dismiss this idea that C++ can avoid wasting a single cycle or byte, it doesn't aim for that. It aims for a much lower bar, albeit still a significant achievement - it says you won't do better by hand.
You're referring to the "zero-overhead" goal of new C++ features. I think the above poster was talking more generally about one's ability when using a language to implement some critical subset as fast as possible or with as little memory use as possible. I suppose it's arguable if you're still doing C++ when you use intrinsics. Though I think pragmas are certainly fair game. At least C++ (and C considered as a subset) is the biggest high-level language with such a possibility.
- gpderetta 5y agoZero overhead abstraction is often discussed, but the explicit design goal of C++ according to its author is that there shouldn't be a language between C++ and ASM. I.e. while you can do better in asm, it shouldn't be possible to do better in another higher level language C++. If you can it means that C++ is missing some feature.