5 ms·
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.
by Retric 10y ago
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.
- haimez 10y agoNot 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.
- Retric 10y agoJava 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.
- forrestthewoods 10y agosize_t forever and always