2 ms·
> you actually can't though. Well, yes I can because I know everything you just said already... > a datastructure based on a linked list will almost always be
by IshKebab 3y ago
> you actually can't though.
Well, yes I can because I know everything you just said already...
> a datastructure based on a linked list will almost always be slower than one based on arrays even though the BigO analyses says otherwise.
Cache locality is one reason that linked lists are usually slower, but I think you've got a bit mixed up because the big O analysis also says they'll be slower (in most common cases).
> that's why, don't assume but measure, it's the best advice there is.
You missed my point (thus proving why this is misleading advice!)