News for hackers. Stuff that matters.
Re:How We Beat C++ STL Binary Search by dastbe on Wednesday August 12, 2015 @10:47AM (#10047969)
Sure, and if you expect your software to run on such a platform with any degree of confidence then you're right to consider it. Even better, tell us about a conforming implementation that you've used in product recently that has UINT_MAX == INT_MAX.

Also I'm not trying to mislead people into thinking that its a good way to implement this. The confounding bit from the article is they started in Java and ended up in C. If you were indexing with signed ints in C, C++, or any language that has unsigned integers then you already have a bug with or without the bad mean check.

Re:How We Beat C++ STL Binary Search by cautious_int on Wednesday August 12, 2015 @11:11AM (#10048117)
You got it backwards there. Only if you know your implementation and plan to code only for it, can you even start to consider bending the C Standard, and not the other way around.