From e293065d80c26b2771f7977a5b6bbb5ac9906a0b Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Fri, 19 Aug 2022 10:07:06 +0000 Subject: Use xxhash for all BucketId hash sets and maps. --- document/src/vespa/document/bucket/bucketid.cpp | 1 - document/src/vespa/document/bucket/bucketid.h | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'document') diff --git a/document/src/vespa/document/bucket/bucketid.cpp b/document/src/vespa/document/bucket/bucketid.cpp index 3752eab4810..72dd3734ce7 100644 --- a/document/src/vespa/document/bucket/bucketid.cpp +++ b/document/src/vespa/document/bucket/bucketid.cpp @@ -158,5 +158,4 @@ operator>>(nbostream &is, BucketId &bucketId) } // document -VESPALIB_HASH_SET_INSTANTIATE_H(document::BucketId, document::BucketId::hash); VESPALIB_HASH_SET_INSTANTIATE_H(document::BucketId, document::BucketId::xxhash); diff --git a/document/src/vespa/document/bucket/bucketid.h b/document/src/vespa/document/bucket/bucketid.h index a0f9ca4e94f..1f944f5349c 100644 --- a/document/src/vespa/document/bucket/bucketid.h +++ b/document/src/vespa/document/bucket/bucketid.h @@ -36,14 +36,10 @@ namespace bucket { class BucketIdList; } class BucketId { public: - struct hash { - size_t operator () (const BucketId& g) const noexcept { - return g.getId(); - } - }; struct xxhash { uint64_t operator () (const BucketId& g) const noexcept; }; + using hash = xxhash; /** * The primitive type used to store bucket identifiers. If you use the -- cgit v1.2.3