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

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -