Re:Data structures and algorithms I actually used while work...
by vishbar on Wednesday July 15, 2020 @05:58AM
(#23843148)
Due to the physical architecture of CPUs/etc., data structures that have "worse" asymptotic performance are often quite a bit faster than those with "better" performance. For example, iterating through a small array to find an item and test for existence is often quite a bit faster than using a hash set for the same operation.
[ Parent
| on HN ]
Re:Data structures and algorithms I actually used while work...
by eru on Wednesday July 15, 2020 @06:54AM
(#23843510)
In the same vein, pre-processing your data via sorting on some carefully chosen keys can sometimes alleviate the need for purpose built data structures.
And because of caches, sorting can sometimes beat hashtables.
Re:Data structures and algorithms I actually used while work...
by dhsysusbsjsi on Wednesday July 15, 2020 @10:22AM
(#23845577)
Which is why I just use the standard library.