Skip to content

Conversation

@iverase
Copy link
Contributor

@iverase iverase commented Aug 13, 2025

Similar to what we did in #132797, speed up the method process 8 elements at a time and manually pack the bits. The gains here are even better:

Benchmark                                 (dims)   Mode  Cnt   Score   Error   Units
PackAsBinaryBenchmark.packAsBinary           384  thrpt    5  16.089 ± 3.159  ops/ms
PackAsBinaryBenchmark.packAsBinary           782  thrpt    5   8.083 ± 0.420  ops/ms
PackAsBinaryBenchmark.packAsBinary          1024  thrpt    5   6.292 ± 0.119  ops/ms
PackAsBinaryBenchmark.packAsBinaryLegacy     384  thrpt    5   6.639 ± 0.796  ops/ms
PackAsBinaryBenchmark.packAsBinaryLegacy     782  thrpt    5   1.312 ± 0.015  ops/ms
PackAsBinaryBenchmark.packAsBinaryLegacy    1024  thrpt    5   2.446 ± 0.069  ops/ms

relates #132761

@iverase iverase requested a review from benwtrent August 13, 2025 14:10
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Aug 13, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

Copy link
Contributor

@john-wagster john-wagster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@iverase iverase merged commit 58eb68c into elastic:main Aug 13, 2025
31 of 33 checks passed
@iverase iverase deleted the packAsBinarySpeed branch August 13, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants