lox / httpcache

An RFC7234 compliant golang http.Handler for caching HTTP responses
MIT License
264 stars 28 forks source link

Reduce allocations in cachecontrol parsing #34

Closed lox closed 7 years ago

lox commented 7 years ago
benchmark                          old ns/op     new ns/op     delta
BenchmarkCacheControlParsing-4     3573          2119          -40.69%

benchmark                          old allocs     new allocs     delta
BenchmarkCacheControlParsing-4     61             4              -93.44%

benchmark                          old bytes     new bytes     delta
BenchmarkCacheControlParsing-4     976           432           -55.74%
lox commented 7 years ago

Many thanks @shurcooL

lox commented 7 years ago

Pretty happy with that @shurcooL :)