3 ms·
From experience I would say it's closer to 100 items, though this is using Go as benchmark. 100 items is also what I would expect considering CPU caches. From
by zaarn 9y ago
From experience I would say it's closer to 100 items, though this is using Go as benchmark. 100 items is also what I would expect considering CPU caches.
From 100 to 1000 items the array performance is not massively worse and shouldn't matter much but a dictionary can beat it (by a tiny bit).
If you're over 1000 definitely use a dictionary or tree.