Repository navigation
Reduce numeric selector scan overhead while preserving features - #1240
Open
njohari-oai wants to merge 1 commit into
Open
njohari-oai wants to merge 1 commit into
njohari-oai wants to merge 1 commit into
Conversation
njohari-oai
force-pushed
the
numeric-selector-feature-scan
branch
from
November 3, 2026 00:48
96e0e55 to
577cd1f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The numeric selector keeps a small sample of value hashes. Once the sample is full, most new hashes can be rejected by comparing them with the largest hash in the heap. Inline that check so only values that can enter the sample call the heap update.
The cardinality scan now computes four hashes per iteration and processes them in their original order. For 16- and 32-bit inputs, the sum of absolute differences fits in 64 bits at the maximum supported element count. Use a 64-bit accumulator in the decision-only scan for those inputs.
On arm64, level-7 encoding of one page of 32,768 Open Targets interaction scores took 1.605 ms of encoder thread CPU time per call, down from 1.815 ms. The median reduction was 11.6% across 12 paired groups of runs.
Type of Change
Performance improvement.
Test Plan
ctest --output-on-failureon Linux x86-64. All 2,059 tests passed.