Skip to content

Feature/excess bit primitives#39

Open
Malkovsky wants to merge 4 commits intomainfrom
feature/excess_bit_primitives
Open

Feature/excess bit primitives#39
Malkovsky wants to merge 4 commits intomainfrom
feature/excess_bit_primitives

Conversation

@Malkovsky
Copy link
Copy Markdown
Owner

  • Implemented 512-bit target excess positions based on 16-bit window expansion
  • Implemented 512-bit target excess positions based on two-stage 4-bit lookups

3.6-5.5x faster than the 16-bit expansion approach (16-24 ns vs 86 ns
per 512-bit block). Uses vpshufb for 4-bit LUT lookups, byte-level
exclusive prefix sum on __m128i, and pdep for result interleaving.
Comment thread include/pixie/bits.h
const size_t num_blocks = 4096;

std::mt19937_64 rng(42);
std::vector<std::array<uint64_t, 8>> blocks(num_blocks);
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.

SUGGESTION: Benchmark setup can be reused to reduce noise

The RNG fill and vector allocation happen for each benchmark invocation and each Arg value. Consider moving blocks (and the RNG seeding) to a static/fixture to reduce setup overhead and improve signal-to-noise in the measurements.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 20, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • CMakePresets.json
  • scripts/coverage_report.sh

Reviewed by gpt-5.2-codex-20260114 · 294,719 tokens

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 97.38806% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.34%. Comparing base (672bb02) to head (fa4516c).

Files with missing lines Patch % Lines
src/tests/excess_positions_tests.cpp 96.85% 4 Missing and 1 partial ⚠️
include/pixie/bits.h 98.16% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
+ Coverage   86.35%   87.34%   +0.98%     
==========================================
  Files          11       12       +1     
  Lines        2850     3136     +286     
  Branches      562      606      +44     
==========================================
+ Hits         2461     2739     +278     
- Misses        254      262       +8     
  Partials      135      135              
Flag Coverage Δ
gcov 87.34% <97.38%> (+0.98%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…rks, add overflow boundary test

- Add detailed comment explaining why int8 arithmetic in base + pos_j
  computation is safe despite the boundary value 128 wrapping to -128
  (neither -128 nor 128 equals 0, so cmpeq_epi8 produces no false positive)
- Refactor benchmarks to share block generation via make_blocks() helper
- Add OverflowBoundary test covering all x in [-64,64] with varying
  prefix fills to exercise the int8 arithmetic boundary cases
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.

1 participant