Skip to content

refactor(hll): reuse the inverse powers lookup table#148

Merged
tisonkun merged 1 commit into
mainfrom
inv-table
Jul 11, 2026
Merged

refactor(hll): reuse the inverse powers lookup table#148
tisonkun merged 1 commit into
mainfrom
inv-table

Conversation

@tisonkun

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: tison <wander4096@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the HLL HIP estimator to reuse the existing shared INVERSE_POWERS_OF_2 lookup table (previously used by CPC), removing the local inv_pow2 helper and enabling the shared table module when the hll feature is selected.

Changes:

  • Switched HIP KxQ updates to use INVERSE_POWERS_OF_2[...] table lookups instead of inv_pow2(...).
  • Removed the now-redundant local inv_pow2 function from hll/estimator.rs.
  • Expanded common::inv_pow2_table module gating to compile under either cpc or hll features.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
datasketches/src/hll/estimator.rs Uses the shared inverse-powers table for HIP KxQ accumulation and removes the local inverse-power helper.
datasketches/src/common/mod.rs Makes inv_pow2_table available when building with the hll feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tisonkun
tisonkun requested review from PsiACE and leerho July 11, 2026 15:29
@tisonkun
tisonkun merged commit 1402037 into main Jul 11, 2026
11 checks passed
@tisonkun
tisonkun deleted the inv-table branch July 11, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants