From 3fe1aeddbc74e43e8561db61cdaad620c5993d92 Mon Sep 17 00:00:00 2001 From: Grigory Bazilevich Date: Wed, 11 Mar 2026 09:44:38 +0300 Subject: pkg/corpus: upgrade corpus minimization algorithm --- pkg/corpus/fenwik.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/corpus/fenwik.go') diff --git a/pkg/corpus/fenwik.go b/pkg/corpus/fenwik.go index 3a49219ac..dd6bfdbef 100644 --- a/pkg/corpus/fenwik.go +++ b/pkg/corpus/fenwik.go @@ -43,6 +43,11 @@ func (t *fenwikTree) prefixSumTo(ind int) (sum int64) { return } +func (t *fenwikTree) reserve(cap int) { + t.capacity = cap + t.extendAndRebuild() +} + func (t *fenwikTree) extendAndRebuild() { if t.capacity == 0 { t.capacity = 16 -- cgit mrf-deployment