github go-chi/httprate v0.11.0
v0.11.0: Improve performance of in-memory rate-limit counter

latest releases: v0.15.0, v0.14.1, v0.14.0...
13 months ago
  • Improves throughput by 2.6x 🚀
  • Reduces memory footprint and allocations by 2x 📉
$ benchstat old.txt new.txt
goos: darwin
goarch: arm64
pkg: github.com/go-chi/httprate
               │   old.txt   │               new.txt               │
               │   sec/op    │   sec/op     vs base                │
LocalCounter-8   34.65m ± 3%   13.50m ± 2%  -61.04% (p=0.000 n=10)

               │   old.txt    │               new.txt                │
               │     B/op     │     B/op      vs base                │
LocalCounter-8   4.384Mi ± 0%   2.846Mi ± 0%  -35.07% (p=0.000 n=10)

               │   old.txt   │               new.txt               │
               │  allocs/op  │  allocs/op   vs base                │
LocalCounter-8   253.9k ± 0%   121.6k ± 0%  -52.12% (p=0.000 n=10)

Don't miss a new httprate release

NewReleases is sending notifications on new releases.