upvote
Also zap the timestamp instant objects if you really need speed; see https://github.com/williame/TimeMillis
reply
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.
reply
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).

reply