3

Modern computer technology seems, to give an enormous edge to arrays. Elements of an array can be shifted and copied at insane speeds. As a result arrays and ArrayList will, in most practical situations, outperform LinkedList on inserts and deletes, often dramatically. In other words, ArrayList will beat LinkedList at its own game.

- Copied as is from a stackoverflow answer. The last sentence is savage.

Comments
  • 1
    I remember benchmarking all the top collections to see if they where really that better or if I really should consider others over ArrayList in terms of performance only based on their use cases, I remember ArrayLists outperforming some of them on their own game already , I guess it was java 7, gotta try to do it again with java 8
  • 0
    @azous Just as computer and languages evolve, like moving away from unmanaged memory to a managed one, a programmer will only have to write what he wants and the computer will choose the most optimized way of doing it. SQL optimizers do it already.
Add Comment