Re:C and C++ Prioritize Performance over Correctness
by titzer on Friday August 18, 2023 @02:39PM
(#37180166)
Exactly. The irony in all of this is that C is not a portable assembler. If you want the exact semantics of a hardware instruction, you cannot get it, because the compiler reasons with C's abstract machine that assumes your program doesn't have undefined behavior, like signed wraparound, when in some situations you in fact do want signed wraparound, since that's what literally every modern CPU does.
[ Parent
| on HN ]
There are no comments on this comment yet.