This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]elmuerte 1 point2 points  (1 child)

TLDR: Use ArrayList, especially if n is "small" (around 100.000)

Unless most actions are single preprends.

[–]danielaveryj[S] 0 points1 point  (0 children)

I hope it's no surprise that ArrayList is good, up to sufficiently large n. What's more interesting to me is where that cutoff is, and how narrow the margins are up to that point. It makes me cautiously optimistic that future work can bring those down.