When we use containsKey we have to compute a hash function for every key and then compare against each with our search item, right ?
Wrong.
When the hash function gives a value, this value is used to index into the table directly. There is no further comparisons, unless collisions occur in which case it may or may not even compare depending on the collision resolution method that is used.
Since you are simply checking for duplicates, a hashset is a better data structure to use