dcrd/gcs
Josh Rickmar 60d7fe080f gcs: Pool MatchAny data allocations
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%
2018-07-12 11:05:57 -04:00
..
blockcf multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
bits.go multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
doc.go multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
gcs_test.go multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
gcs.go gcs: Pool MatchAny data allocations 2018-07-12 11:05:57 -04:00
gcsbench_test.go multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
go.mod multi: Define vgo modules. 2018-05-25 15:38:16 -05:00
go.modverify multi: Define vgo modules. 2018-05-25 15:38:16 -05:00
README.md multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00

gcs

GoDoc

Package gcs provides an API for building and using a Golomb-coded set filter similar to that described here.

A comprehensive suite of tests is provided to ensure proper functionality.