diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-07-24 06:22:25 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-07-24 06:22:25 +0000 |
| commit | 1a06fe5f7ea47112a5e8ac6e0cc471ef96759591 (patch) | |
| tree | 5cb3bb9ac19f0e535cf1590871de183847bc80df /libcxx/include/__hash_table | |
| parent | 904a5d700752b19fec363f4bf8d00d5eef2c7efd (diff) | |
| download | bcm5719-llvm-1a06fe5f7ea47112a5e8ac6e0cc471ef96759591.tar.gz bcm5719-llvm-1a06fe5f7ea47112a5e8ac6e0cc471ef96759591.zip | |
Skip chash computation in insert/emplace if the unconstrained hash matches.
llvm-svn: 276549
Diffstat (limited to 'libcxx/include/__hash_table')
| -rw-r--r-- | libcxx/include/__hash_table | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table index 0210c6f67b7..6a0e6fea08a 100644 --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -1961,7 +1961,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __constrain_hash(__nd->__hash(), __bc) == __chash; + (__nd->__hash() == __hash || __constrain_hash(__nd->__hash(), __bc) == __chash); __nd = __nd->__next_) { if (key_eq()(__nd->__upcast()->__value_, __k)) |

