logoalt Hacker News

Okxtoday at 4:32 PM1 replyview on HN

maybe it would be a little better to use ints rather than longs, as Java lists can't be bigger than the int max value anyways. Saves you a cache line or two.


Replies

cogman10today at 4:34 PM

Fair point, but it is possible this isn't a list but rather some sort of iterable. Those can be boundless.

Practically speaking, that would be pretty unusual. I don't think I've ever seen that sort of construct in my day to day coding (which could realistically have more than 1B elements).