commit | 956b01e9afeda73b08c3db3c1be47b5832e82a7e | [log] [tgz] |
---|---|---|
author | Shreya Bhattarai <shreyax@google.com> | Mon Jun 13 18:28:02 2016 +0000 |
committer | Yue Gan <yueg@google.com> | Tue Jun 14 08:14:46 2016 +0000 |
tree | 5d0b69cd7592eb759bdad8017ca86b384575da28 | |
parent | a93555c45d7bd091c62e8e3046db6b678ae0affa [diff] [blame] |
Use the precomputed skykey hash to short circuit equality comparison. -- MOS_MIGRATED_REVID=124747935
diff --git a/src/main/java/com/google/devtools/build/skyframe/SkyKey.java b/src/main/java/com/google/devtools/build/skyframe/SkyKey.java index bc15bf8..f2355e1 100644 --- a/src/main/java/com/google/devtools/build/skyframe/SkyKey.java +++ b/src/main/java/com/google/devtools/build/skyframe/SkyKey.java
@@ -112,6 +112,9 @@ return false; } SkyKey other = (SkyKey) obj; + if (hashCode() != other.hashCode()) { + return false; + } return functionName.equals(other.functionName) && argument.equals(other.argument); }