Skip to content

AndNot: materialize results directly into arena slots#48

Merged
aliszka merged 2 commits into
perf/andnot-exact-sizefrom
perf/andnot-materialize
Jul 7, 2026
Merged

AndNot: materialize results directly into arena slots#48
aliszka merged 2 commits into
perf/andnot-exact-sizefrom
perf/andnot-materialize

Conversation

@aliszka

@aliszka aliszka commented Jul 7, 2026

Copy link
Copy Markdown
Member

containerAndNotAlt gains a non-inline mode that fills a caller-sized slot in place (bitmap or compact array, selected by len(dst)); pass 2 reserves the slot and drops the separate repacking helpers.

Enumeration is split into typed *IntoArray methods and array framing shares setArrayHeader.
No behavior change; ~6% faster HeavyShrink, ~3% Dense, allocations unchanged.

containerAndNotAlt gains a non-inline mode that fills a caller-sized
slot in place (bitmap or compact array, selected by len(dst)); pass 2
reserves the slot and drops the separate repacking helpers. Enumeration
is split into typed *IntoArray methods and array framing shares
setArrayHeader. No behavior change; ~6% faster HeavyShrink, ~3% Dense,
allocations unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

Trust the container cardinality header in andNotResultCard instead of
popcounting bitmap sources: the bc==nil/empty and bitmap-array cases now
read the header, with a floor-based early exit for the latter. Inline the
dense check, fold nil/empty into one guard, and drop the corrupt-header
test that pinned the old count-by-bits behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aliszka aliszka force-pushed the perf/andnot-materialize branch from e10f24a to 9924606 Compare July 7, 2026 11:10
@aliszka aliszka merged commit 733300f into perf/andnot-exact-size Jul 7, 2026
3 checks passed
@aliszka aliszka deleted the perf/andnot-materialize branch July 7, 2026 11:48
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.

2 participants