From 173d1bfbfb4a5821e965725af37c8079d3d65c22 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 19 Jan 2023 21:04:21 +0000 Subject: Suggest hot path to make it easier on the compiler to do the right thing. --- vespalib/src/vespa/vespalib/stllike/hashtable.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vespalib') 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::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 { -- cgit v1.2.3