Myth: Compilers optimizing based on undefined behavior is one of the biggest real world problems with C/C++. It’s actually nowhere near.
-
-
Loop trip count detection is easy for unsigned but not for signed (in some cases). The problem is that everyone writes for (int i = …) in C.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Compilers can assume signed integer never overflows, this use the most optimal indexing method. When you use unsigned, there are subtleties
-
the more obvious one is that a 8/16/32-bit index in a 64-bit system requires additional logic because it doesn't overflow at 0xfffffffffffff
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.