mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
kmp-negentropy v1.1.1 adds the `IStorage.fingerprint(begin, end)` seam we needed and ships `PrefixSumStorageVector` — a drop-in IStorage that builds an additive prefix-sum table on seal() and answers any range fingerprint in O(1) instead of re-walking the range. Range fingerprints are the CPU-bound core of a NEG-MSG on a large snapshot; profiling pinned them as the steady-state reconcile cost geode lost multiples on (not serialization). Seal a `PrefixSumStorageVector` in both `NegentropyServerSession.sealVector` (server / relay-relay responder, also backs the `LiveNegentropyIndex` snapshot cache) and `NegentropySession` (initiator). Byte-identical to the plain vector — only the fingerprint path is accelerated. `NegentropyPrefixFingerprintTest` now also asserts the library's `PrefixSumStorageVector.fingerprint` matches the plain walk over 2000 random ranges + boundaries at 50k; the reconcile-shaped mix measures 601× (447 ms → 0.7 ms). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EZeWww5TJnzBZKPoc6mvU