On 1/30/2018 1:02 PM, H. S. Teoh wrote:
Where's C++'s "enormous performance advantage?"  I'm not seeing it,
except in this article, and, presumably, in the author's imagination.

I know C, C++, and D code generation semantics. There is only one case where C/C++ can fundamentally generate better code than D. That's where C/C++ have undefined behavior when signed integers overflow, and slightly better code can be generated for it.

D has defined behavior for this (2's complement), and so does Rust. The performance enhancement can be obtained if you use unsigned integers instead, and besides, the advantage is very slight, and comes with a large amount of confusion for even experienced programmers. Not worth it.

Reply via email to