If I have a hashmap let's say map1 with hashsets as keys and another hashmap let's say map2 with integers as keys.
My query is what will be the performance for a lookup for a key in both the hashmaps ..??
Lookups are like this (Assuming keys don't exist in hashmaps)
map1.containsKey(6);
map2.containsKey(anyHashSet);
Which lookup will take more time or the lookup time will be same for both the cases and why ??