v0.1.0
- Typed elements sync.Pool, with very similar API
- Allow customizing reuse of elements based on custom policies
- Allow creating new elements with appropriate preallocation
- Lock-free internal reading of statistics
- Provides two implementations of elements: one for
*bytes.Buffer
and one generic for slices, which assume a Normal Distribution - Rolling statistics implementation that keeps Mean and Standard Deviation
- Allows to bias statistics towards recent
maxN
elements to improve adaptability to seasonal changes
Results of benchmarks on rolling statistics implementation:
goos: linux
goarch: amd64
pkg: github.com/diegommm/adaptivepool
cpu: 13th Gen Intel(R) Core(TM) i7-13700H
│ - │
│ sec/op │
Stats/implem=stats1-20 94.72µ ± 6%
Full Changelog: https://github.com/diegommm/adaptivepool/commits/v0.1.0