News for hackers. Stuff that matters.
Re:Teach Yourself Computer Science by palunon on Tuesday March 14, 2017 @06:02AM (#13866251)
>It can be as simple as Arrays vs. LinkedLists; where Arrays have zero cost access and LinkedLists have high indexing costs, but low constant time insertion costs where you don't know the content length.

But then in the real world, arrays can still be faster than lists even when you're inserting a lot...

https://www.youtube.com/watch?v=YQs6IC-vgmo

Re:Teach Yourself Computer Science by bluejekyll on Tuesday March 14, 2017 @10:45AM (#13867852)
Yes, if you can afford the allocation of the memory upfront Arrays are always faster :)

My point was more that understanding the semantics of the two types is important to how the program will run.