You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fccdc63
Browse filesBrowse the repository at this point in the historyBrowse files
fastaggregation: count before allocating in FastAnd
FastAnd with three or more inputs intersected them pairwise, allocating
an intermediate container per input and key even when the result was
empty.
The input with the fewest keys now drives: each of its keys is looked
up in the first four inputs with stack cursors, and an array key is
also checked for a shared value, before anything is allocated. A key
that survives is intersected count-first: bitmaps in a stack scratch
bitmap, with runs clearing what they do not cover, and arrays through
the existing and and iand. Any further inputs are intersected into the
result one at a time, as before; walking every input for every key was
up to 1.9x slower than pairwise And when many inputs keep their keys.
bitmapContainer.andArray hoists its slice headers out of the loop, a
quarter faster on amd64 and arm64, and ParAnd's worker now calls the
same andKChain.
Xeon 8375C, against pairwise And in the same binary:
jointly-empty 14.0 µs -> 1.9 µs (7.3x), 1 alloc instead of 18
singletons-10000 25.9 µs -> 12.4 µs (2.1x)
array30-runs 486 ns -> 286 ns (1.7x)
BenchmarkRealDataFastAnd (added) is 1.9x to 97x faster than master on
all twelve datasets.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0198cmGsvonq19wTyzKBsw2Z
0 commit comments