4 ms·
Using array based data structures also get you more cache hits. For smaller data sets, this may well be faster than a fancy algorithm.
by mav3rick 6y ago
Using array based data structures also get you more cache hits. For smaller data sets, this may well be faster than a fancy algorithm.
- bluGill 6y agoThis is true only if you are iterating over the entire array often. If you only rarely need to access one data member the array will not be in cache and so you have less to load from memory. Depending on how your data is structured the array may or may not save time even in small sizes.