On 5 January 2016 at 06:36, wrote: > 1) why do we cast to long? > because that's the type all existing code expected, and there wasn't much application for > 4gb in single arrays at the time (as opposed to having big memory in big address spaces) > 2) if a pointer subtraction has to yield a long, why dont we cast *after* > the division? > that would be certainly be better. having said that, because of caching effects, especially on NUMA, it's worth looking at data structures that big to decide whether they might be better organised less naively.