Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove all the extra allocations in the Patricia tree. O(1) allocation for Patricia and ~10% improvement for HTTP1 matching. benchmark old ns/op new ns/op delta BenchmarkCMuxConnHTTP1-4 908 782 -13.88% BenchmarkCMuxConnHTTP2-4 835 818 -2.04% BenchmarkCMuxConnHTTP1n2-4 1074 1033 -3.82% BenchmarkCMuxConnHTTP2n1-4 1010 901 -10.79% benchmark old allocs new allocs delta BenchmarkCMuxConnHTTP1-4 5 3 -40.00% BenchmarkCMuxConnHTTP2-4 4 4 +0.00% BenchmarkCMuxConnHTTP1n2-4 6 4 -33.33% BenchmarkCMuxConnHTTP2n1-4 6 4 -33.33% benchmark old bytes new bytes delta BenchmarkCMuxConnHTTP1-4 276 272 -1.45% BenchmarkCMuxConnHTTP2-4 304 304 +0.00% BenchmarkCMuxConnHTTP1n2-4 306 304 -0.65% BenchmarkCMuxConnHTTP2n1-4 308 304 -1.30%
- Loading branch information