3 ms·
> How often does the average programmer need to care about the underlying mechanism a map? I think it's useful to know it's not an O(1) lookup as many programm
by BeetleB 3y ago
> How often does the average programmer need to care about the underlying mechanism a map?
I think it's useful to know it's not an O(1) lookup as many programmers seem to assume. Definitely useful to know it is ordered.
Also, I once ran out of RAM (over 80GB), because of all the extra pointers needed in a tree. I switched to a sorted array and used a binary search instead - got the same performance, without running out of RAM.