|
|
|
|
|
by seanmcdirmid
2584 days ago
|
|
As N approaches infinity O(log32 n) approaches O(log n). And really, we don’t care much about N until it gets very large. > In typical access patterns, they are faster than mutable arrays. Only if typical is extremely random on large lists that consume many pages/cache lines. |
|
Edit: That's true about log32 and log2 become close in the limit, but that's irrelevant for practical data sizes. For example,
log2(10^6) ~ 20,
log32(10^6) ~ 4
That's a 5x difference.