This change optimizes the memory usage of gcs.MatchAny by introducing a sync.Pool manage allocations of uncompressed match sets. This change improves memory utilization for wallets which must execute MatchAny against all block cfilters during rescanning. benchmark old ns/op new ns/op delta BenchmarkGCSFilterBuild50000-32 4112010 3874605 -5.77% BenchmarkGCSFilterBuild100000-32 7913372 7462646 -5.70% BenchmarkGCSFilterMatch-32 479 486 +1.46% BenchmarkGCSFilterMatchAny-32 1577 1425 -9.64% benchmark old allocs new allocs delta BenchmarkGCSFilterBuild50000-32 30 30 +0.00% BenchmarkGCSFilterBuild100000-32 33 33 +0.00% BenchmarkGCSFilterMatch-32 0 0 +0.00% BenchmarkGCSFilterMatchAny-32 2 0 -100.00% benchmark old bytes new bytes delta BenchmarkGCSFilterBuild50000-32 1202278 1202284 +0.00% BenchmarkGCSFilterBuild100000-32 2496604 2496586 -0.00% BenchmarkGCSFilterMatch-32 0 0 +0.00% BenchmarkGCSFilterMatchAny-32 176 0 -100.00% |
||
|---|---|---|
| .. | ||
| blockcf | ||
| bits.go | ||
| doc.go | ||
| gcs_test.go | ||
| gcs.go | ||
| gcsbench_test.go | ||
| go.mod | ||
| go.modverify | ||
| README.md | ||
