java - HashSet internally uses hashmap for its implementation, then why is hashmap faster than hashset? -


hashset internally uses hashmap implementation, why hashmap faster hashset?

i tried reading above mentioned post in search unable find clear answer

because hashset uses hashmap. must incur cost of using hashmap, plus overhead of hashset itself.


Comments

Popular posts from this blog

mongodb - Struggling to get ordered results from the last retrieved article, given array of elements to search in -

c# - Pausing a storyboard on TabItem mouse over -

c# - Attribute value in root node of xml Linq to XML -