Monday, April 24, 2017

Java | Memorry Consumtion | LinkedList Vs ArrayList

If memory matters, use ArrayList!
LinkedList might allocate fewer entries, but those entries are astronomically more expensive than they'd be for ArrayList -- enough that even the worst-case ArrayList is cheaper as far as memory is concerned.Louis Wasserman

No comments:

Post a Comment