mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-08 13:36:26 +00:00
[ADT] Compare strings' hashes first before comparing their values.
Summary: We already have the hashes in hand, and comparing hashes should be much more discriminatory than comparing the StringRefs' sizes. Reviewers: rafael Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25705 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284872 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
228ec7d254
commit
2a98ad5c2c
@ -61,7 +61,8 @@ template <> struct DenseMapInfo<CachedHashStringRef> {
|
||||
}
|
||||
static bool isEqual(const CachedHashStringRef &LHS,
|
||||
const CachedHashStringRef &RHS) {
|
||||
return DenseMapInfo<StringRef>::isEqual(LHS.val(), RHS.val());
|
||||
return LHS.hash() == RHS.hash() &&
|
||||
DenseMapInfo<StringRef>::isEqual(LHS.val(), RHS.val());
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user