2 ms·
I have heard this a few times now. Honestly, I could not believe it the first time I read it. It is a little bit like 10 years ago, when I finally gave up on
by throwaway2037 2y ago
I have heard this a few times now. Honestly, I could not believe it the first time I read it. It is a little bit like 10 years ago, when I finally gave up on using linked lists and just replaced them with dynamic arrays (whatever language is fine) after realising that the memory locality gains (less cache misses) far outweighed the relatively rare instances that I needed to insert/delete from the collection. And, if the collection was small enough, the insert or delete from a dynamic array can be faster than a linked list ... thanks again to memory locality! (Again, my mind was blown by these discoveries.) To be clear to readers: I'm talking about bog-standard CRUD apps written at mega-corps. No special operating environments.
I tried to Google for some blog posts, but I could find anything. Does anyone know of any (amateur) research on this topic? Example: Running on Linux, written in C, what is the threshold for N to switch from binary search to linear search?
EDIT: Fix typos