diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-03-31 22:59:08 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-03-31 22:59:08 +0000 |
commit | 7e028c9a1729ea8998d621b2ca179e2b55cdc211 (patch) | |
tree | 4eb9b4f258ef6ba696194bb79de0c661343c2e14 /vespalib | |
parent | f93e8f9744dc51051c7c83773738fa1224d18e93 (diff) |
- Based on feedback from callgrind and perf add hint about most likely branch in frequently called code.
- Inline small frequent methods.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/util/compress.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/util/compress.h b/vespalib/src/vespa/vespalib/util/compress.h index f4190c999c3..2bab2083b34 100644 --- a/vespalib/src/vespa/vespalib/util/compress.h +++ b/vespalib/src/vespa/vespalib/util/compress.h @@ -42,7 +42,7 @@ public: const uint8_t * src = static_cast<const uint8_t *>(srcv); const uint8_t c = src[0]; size_t numbytes; - if (c & 0x40) { + if (__builtin_expect(c & 0x40, false)) { if (c & 0x20) { n = ((c & 0x1f) << 24) + (src[1] << 16) + (src[2] << 8) + src[3]; numbytes = 4; |