Array-like containers aren’t the only containers we need. Today we’ll look at the non-array containers the C++ Standard Library provides, including its equivalents of
Posts Tagged hashset
Say you need to keep track of things you’ve already done, perhaps to avoid doing them again. What’s the fastest way to do that?
HashSet<T> seems like a natural fit, so you might choose that without a second thought. But is it faster than similar collections like
Dictionary<TKey, TValue>? Today’s article puts all three to the test to see which one can insert elements, check for containment, and remove elements the quickest. Read on for the surprising results!