tisonkun commented on PR #329: URL: https://github.com/apache/datasketches-rust/pull/329#issuecomment-6659430296
This reduces the 64-bit filter header from 56 to 48 bytes. It is a memory tradeoff, not a lookup speedup: the imported-filter query benchmark is mostly 2–5% slower than main. The unknown-count path now loads and compares one count instead of branching around the count check based on the Option tag. Before: `main 4ba130e`; after: `6b449a3`. Apple M4 Max, macOS ARM64, nightly-2026-08-28, optimized bench profile with ThinLTO. Three repetitions per revision, interleaved B/A/A/B/B/A; fixed 20,000 rounds, each querying 32 filters 256 times. Same fixtures, rounds, and timing boundaries. Values are median milliseconds [min–max]; positive change means more elapsed time. | Scenario | Main | PR | Change | | --- | ---: | ---: | ---: | | 8_present/128 | 273 [272–277] | 286 [280–304] | +4.8% | | 8_absent/128 | 276 [273–280] | 282 [281–285] | +2.2% | | 8_present/16384 | 353 [340–353] | 354 [353–368] | +0.3% | | 8_absent/16384 | 348 [337–362] | 357 [354–361] | +2.6% | | 16_present/128 | 280 [275–283] | 286 [286–292] | +2.1% | | 16_absent/128 | 281 [278–301] | 288 [286–288] | +2.5% | | 16_present/16384 | 362 [357–367] | 369 [361–369] | +1.9% | | 16_absent/16384 | 353 [350–360] | 366 [361–366] | +3.7% | | 32_present/128 | 275 [273–277] | 282 [279–284] | +2.5% | | 32_absent/128 | 276 [275–281] | 282 [281–285] | +2.2% | | 32_present/16384 | 359 [352–375] | 368 [360–373] | +2.5% | | 32_absent/16384 | 358 [354–365] | 366 [363–367] | +2.2% | Reproduce each revision with `CARGO_PROFILE_BENCH_LTO=thin cargo +nightly-2026-08-28 bench -p benchmarks --bench benchmarks -- xor::query_shards --baseline-only --repeat 3 --raw`. The empty-set check remains necessary: a known-empty filter must reject every hash, while an imported filter with unknown cardinality must preserve the fingerprint comparison. No additional query special cases or packed metadata types were added. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
