About 22,800 results
Open links in new tab
  1. Difference between HashSet and HashMap? - Stack Overflow

    Apart from the fact that HashSet does not allow duplicate values, what is the difference between HashMap and HashSet in their implementation? It's a little bit vague because both use hash …

  2. memory management - Java : HashSet vs. HashMap - Stack Overflow

    Feb 1, 2015 · HashSet is built on top of a HashMap< T, Object >, where value is a singleton ‘present’ object. It means that the memory consumption of aHashSet is identical to HashMap: …

  3. java - Why is HashMap faster than HashSet? - Stack Overflow

    HashMap is faster than HashSet because the values are associated to a unique key. In HashSet, member object is used for calculating hashcode value which can be same for two objects so …

  4. collections - Java HashSet vs HashMap - Stack Overflow

    I understand that HashSet is based on HashMap implementation but is used when you need unique set of elements. So why in the next code when putting same objects into the map and …

  5. Java hashmap vs hashset performance - Stack Overflow

    Mar 1, 2017 · HashMap vs HashSet: HashSet internally uses HashMap. So, there shouldn't be any performance difference whatsoever if you use them for the same purpose. Ideally, both of …

  6. collections - What are the differences between a HashMap and a ...

    What are the differences between a HashMap and a Hashtable in Java? Which is more efficient for non-threaded applications?

  7. Hashtable, HashMap, HashSet , hash table concept in Java …

    Hashtable and HashMap both implement Map, HashSet implements Set, and they all use hash codes for keys/objects contained in the sets to improve performance. Hashtable and HashMap …

  8. Why would I use a HashSet over a Dictionary? - Stack Overflow

    Jan 18, 2015 · Don't use FirstOrDefault; just use HashSet.Contains (p) and HashSet.Remove (p) where 'p' is a new instance of CachedPath with the properties that you are looking for. I ran …

  9. java - hashmap or hashset? - Stack Overflow

    May 17, 2011 · HashSet doesn't calculates item's hash each time. I don't think that performance difference between HashSet and HashMap is noticeable. There is difference in the way they …

  10. collections - What is the main difference between Hashset, Treeset …

    Switching to the difference between HashSet and LinkedHashSet, please note that LinkedHashSet is a subclass of HashSet. They are not sorted sets. HashSet is the fastest …