Re:Nearly All Binary Searches and Mergesorts Are Broken (2006)
by Retric on Friday July 22, 2016 @08:57PM
(#12147838)
All of those proposed solutions still fail on valid arrays that are to large. We changed to 64 bit OS and you now 32 bit indexes just don't cut it.
[ Parent
| on HN ]
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006)
by haimez on Friday July 22, 2016 @09:16PM
(#12147891)
Not in java (arrays can only be indexed by a signed 32 bit integer) and the C++ solution works exactly the same way with the full 64 bit data types. That much should be obvious, and if you think you might legitimately exceed two billion elements in the array you're sorting- you'd be a fool to rely on someone else's sort implementation.
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006)
by Retric on Saturday July 23, 2016 @06:34AM
(#12149068)
Java uses shorts in some JavaCard implementations. So, it's clearly just a legacy limitation which will eventually be removed.
As to C++ 2+ billion byte arrays are not uncommon. It's just a few gigs of ram for int[] arrays.
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006)
by forrestthewoods on Friday July 22, 2016 @09:59PM
(#12148007)
size_t forever and always