A poor hashCode() can degrade HashMap performance.
The efficiency of a HashMap is highly dependent on the quality of the hashCode() implementation. A poorly distributed hash function can lead to many keys clustering in the same bucket, degrading the performance to O(n). Always ensure your hashCode() method distributes keys uniformly.