News for hackers. Stuff that matters.
Re:Nearly All Binary Searches and Mergesorts are Broken (2006) by Retric on Thursday July 09, 2015 @05:07PM (#9860684)
CPU speed is rarely a limitation because RAM is just stupid slow, and in MIPS and Alpha CPU's with HW support it's a rounding error as in well under 1% for most code. Even software based overflow detection runs in the 5-10% range not 100-1,000% range your suggesting.

PS: There are several models you can test yourself. http://blog.regehr.org/archives/1154

edit: http://resources.sei.cmu.edu/asset_files/TechnicalNote/2010_... Has actual benchmarks in the 6-8% range.

Re:Nearly All Binary Searches and Mergesorts are Broken (2006) by wtallis on Thursday July 09, 2015 @05:22PM (#9860778)
Yeah, it's pretty much a given that checking for overflow won't be the bottleneck when you're doing pointer arithmetic to traverse a large data structure. The memory accesses will dominate over the cost of the highly-predictable branches.