diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-19 21:04:21 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-19 21:04:21 +0000 |
commit | 173d1bfbfb4a5821e965725af37c8079d3d65c22 (patch) | |
tree | fbf3df15908dd71a6944fbc502e40ebf1d87d99b /vespalib | |
parent | 8a32722e5a214013918f5a07a53f9c696bf732a2 (diff) |
Suggest hot path to make it easier on the compiler to do the right thing.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/hashtable.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/stllike/hashtable.hpp b/vespalib/src/vespa/vespalib/stllike/hashtable.hpp index 8289b5a5fd4..cd0a4fbee80 100644 --- a/vespalib/src/vespa/vespalib/stllike/hashtable.hpp +++ b/vespalib/src/vespa/vespalib/stllike/hashtable.hpp @@ -188,7 +188,7 @@ void hashtable<Key, Value, Hash, Equal, KeyExtract, Modulator>::force_insert(Value && value) { const next_t h = hash(_keyExtractor(value)); - if ( ! _nodes[h].valid() ) { + if ( ! _nodes[h].valid() ) [[likely]] { _nodes[h] = std::move(value); _count++; } else { |