News for hackers. Stuff that matters.
Re:Signed Integers Are Two’s Complement by loup-vaillant on Thursday May 31, 2018 @08:22AM (#17195744)
This case is not worth optimising, because the index should be size_t just like the original size. Then the compiler knows it won't overflow, and doesn't have to check.
Re:Signed Integers Are Two’s Complement by loup-vaillant on Thursday May 31, 2018 @10:57AM (#17196771)
And, the fix is easy: just use types of the same width for the counter and the boundary. Using a narrower counter is just begging for errors to happen. This is not a good coding style, and there is no point in having the compiler condoning it.

Compiling it and making it run? Sure. Bending over backwards to ensure it runs fast? Hell no.