3 ms·
> Part of the problem ... is figuring out what the compiler is going to do Not meant to offend you, but that should not be any of your business :-)
by pif 10y ago
> Part of the problem ... is figuring out what the compiler is going to do
Not meant to offend you, but that should not be any of your business :-)
- EliRivers 10y agoI disagree. C++ has never had a clearly defined abstract machine, or a common virtual machine. Knowledge of what is actually going to happen is necessary if one needs high performance in anything other than trivial circumstances, and knowledge of what the compiler is going to do is part of that. In C++, there are times when it very much is our business to know how our tools work and what they're going to do. There are languages in which not knowing what the tools are going to do is never a concern. C++ isn't one of those languages.
- pif 10y agoI've been several times in the situation of having to push the language to its limits for performance, and gcc documentation was of great help. But, maybe it's a nice property of gcc, maybe it's a nice property of gcc's documentation, I never felt I had to learn some dirty trick for gcc in particular. I always understood the principle behind the implementation, and the code I wrote as a consequence was better in principle, too. Summing up, knowing your tool is a must, but if you find yourself doing its job, than it's time to at least question your choice.
- jnordwick 10y agoWhen micro- and nanoseconds matter, it is your job to dig into the ugliness of the generated code, if it is C/C++/Rust or even if it is Java.