News for hackers. Stuff that matters.
Re:Nearly All Binary Searches and Mergesorts are Broken (2006) by hga on Thursday July 09, 2015 @04:08PM (#9860351)
Not in RISC-V, which despite saying it wants to be relevant to industry, is entirely lacking in extra features for integer error detection besides divide by zero.

They justify it ... with all the popular languages that silently allow these errors.

Re:Nearly All Binary Searches and Mergesorts are Broken (2006) by mark-r on Thursday July 09, 2015 @05:00PM (#9860646)
This is the chicken or egg problem. If one of the leading languages had required bounds checking back when the processor instruction sets were being defined, those instructions would already exist and the cost today would be negligible. But the languages didn't include it because it would have been expensive at the time.
Re:Nearly All Binary Searches and Mergesorts are Broken (2006) by kybernetikos on Thursday July 09, 2015 @07:36PM (#9861417)
I'm sure I did a bunch of assembly programming on a CPU that had a flag telling you if the last calculation overflowed or not. Branch if overflow was a straightforward opcode.
Re:Nearly All Binary Searches and Mergesorts are Broken (2006) by mark-r on Friday July 10, 2015 @12:18PM (#9864830)
Yes, but adding the branch instruction itself is the killer. If the processor had some kind of trap to set for overflow, there would be no extra instructions and no timing overhead when there wasn't an overflow.
Re:Nearly All Binary Searches and Mergesorts are Broken (2006) by hga on Thursday July 09, 2015 @08:13PM (#9861576)
Indeed. I'm not sure how far back this goes, but definitely to the PDP-11, and looks like the IBM 360.