{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":6051812,"defaultBranch":"main","name":"mux","ownerLogin":"gorilla","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2012-10-02T21:32:24.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/489566?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1699221430.0","currentOid":""},"activityList":{"items":[{"before":"976b536446a77de8de2d5559c78f612970fb5e37","after":"7d9a6f73b4eadcde69da1398a254ed4421de8285","ref":"refs/heads/main","pushedAt":"2024-04-02T03:14:54.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"AlexVulaj","name":"Alex Vulaj","path":"/AlexVulaj","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15162960?s=80&v=4"},"commit":{"message":"Don't assign a variable for unused param","shortMessageHtmlLink":"Don't assign a variable for unused param"}},{"before":"e44017df2b8798f6bfff81fff1c0b319c1a54496","after":"976b536446a77de8de2d5559c78f612970fb5e37","ref":"refs/heads/main","pushedAt":"2024-01-22T04:09:27.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"AlexVulaj","name":"Alex Vulaj","path":"/AlexVulaj","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15162960?s=80&v=4"},"commit":{"message":"Fixed processing of multiple queries for the same path","shortMessageHtmlLink":"Fixed processing of multiple queries for the same path"}},{"before":"f79c3af9b03521687ad5be6a9d0cf7e9b8207d7d","after":"e44017df2b8798f6bfff81fff1c0b319c1a54496","ref":"refs/heads/main","pushedAt":"2023-12-07T04:58:53.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"AlexVulaj","name":"Alex Vulaj","path":"/AlexVulaj","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15162960?s=80&v=4"},"commit":{"message":"perf: cut allocations (#691)\n\n**Summary of Changes**\r\n\r\nHello!\r\n\r\nI found a few \"low hanging\" allocations that can be deferred until\r\nneeded or\r\n even skipped entirely.\r\n\r\nWith all the optimizations combined, we can see the best improvement for\r\nsimple, static routes (like a `/status` endpoint) that do not read the\r\n`Route`\r\nfrom the request context via `CurrentRoute` and do not populate any\r\nvars.\r\nOn these routes, we can process requests with a single allocation for\r\nthe\r\n `RouteMatch` object. Previously there were 9 extra allocations.\r\nFor said routes the processing overhead (ns/op) in mux dropped by 75%,\r\nwhich is\r\n a speedup of 4x.\r\n\r\nOther routes can expect to see a double-digit percentage reduction in\r\nboth\r\n processing overhead (ns/op) and allocations as well.\r\nThese are driven by merging the context population into a single\r\noperation,\r\n eliminating two of ten allocations.\r\n\r\n(Eliminating that last allocation for the `RouteMatch` in the best case\r\nrequires significant refactoring to maintain full backwards\r\ncompatibility.\r\n Something for another day.)\r\n\r\nEach commit message contains benchmark results for showcasing particular\r\n(micro) optimizations in reduced allocations and in a few cases notable\r\ndirect\r\n CPU time savings.\r\n\r\nI also ran longer benchmarks with 100 repetitions in multiple settings\r\non\r\n different generations of (server) CPUs.\r\nFirst, there is the full set of benchmarks in this repository and\r\nsecond, the\r\npopular benchmarks\r\nhttps://github.com/julienschmidt/go-http-routing-benchmark.\r\n\r\nAll but the last change are entirely \"free\", as in they do not cut\r\nfeatures for\r\n gains in performance. The last change for omitting the `Route` from the\r\ncontext is behind an optional flag that users can opt in when they do\r\nnot read\r\n the `Route` from the request context.\r\nSaid flag is stored local in a `Router`, so users can enable/disable the\r\nflag\r\n on Subrouters individually.\r\n\r\n
\r\n Benchmark results \r\n\r\nI added all the new benchmarks onto a `baseline` branch for comparing\r\nthe\r\nperformance of the changes, tip is\r\n0eba4f5731f329d9a95b67359e795344343a6119.\r\n\r\nI'm running these tests on \"shared\" compute instances (and my Laptop),\r\nso\r\n expect some noise (and frequency scaling on the i7).\r\n\r\n
\r\n mux project benchmarks \r\n\r\nYou can reproduce these benchmarks using docker, pinned to CPU 1:\r\n\r\n```bash\r\ndocker run --rm --pull always -v /logs:/logs --cpuset-cpus 1 -d golang:1.18 bash -exc 'git clone https://github.com/das7pad/mux.git && cd mux && for branch in baseline perf-cut-allocations; do git checkout \"$branch\" && go test -benchmem -bench . -count 100 -timeout 1h > \"/logs/$branch-all.txt\"; done; go install golang.org/x/perf/cmd/benchstat@latest; benchstat /logs/baseline-all.txt /logs/perf-cut-allocations-all.txt > /logs/compare-all.txt'\r\n```\r\n\r\n
\r\n Modern Xeon E, 3.4 GHz \r\n\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/gorilla/mux\r\ncpu: Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz\r\n\r\nname old time/op new time/op delta\r\nMux 1.09µs ± 5% 0.96µs ± 6% -12.33% (p=0.000 n=90+90)\r\nMuxSimple/default 654ns ± 5% 333ns ± 4% -49.06% (p=0.000 n=90+94)\r\nMuxSimple/omit_route_from_ctx 655ns ± 5% 146ns ± 3% -77.78% (p=0.000 n=93+95)\r\nMuxAlternativeInRegexp 1.58µs ± 5% 1.30µs ± 3% -17.75% (p=0.000 n=92+90)\r\nManyPathVariables 1.82µs ± 6% 1.65µs ± 5% -9.73% (p=0.000 n=94+93)\r\nPopulateContext/no_populated_vars 665ns ± 5% 339ns ± 5% -48.97% (p=0.000 n=95+96)\r\nPopulateContext/empty_var 910ns ± 5% 763ns ± 6% -16.16% (p=0.000 n=84+87)\r\nPopulateContext/populated_vars 974ns ±10% 807ns ± 7% -17.13% (p=0.000 n=96+89)\r\nPopulateContext/omit_route_/static 664ns ± 5% 148ns ± 3% -77.66% (p=0.000 n=94+89)\r\nPopulateContext/omit_route_/dynamic 915ns ± 6% 741ns ± 6% -18.98% (p=0.000 n=90+94)\r\n_findQueryKey/0 158ns ± 2% 146ns ± 2% -7.07% (p=0.000 n=91+88)\r\n_findQueryKey/1 198ns ± 4% 196ns ± 5% -0.56% (p=0.001 n=92+95)\r\n_findQueryKey/2 710ns ± 4% 705ns ± 4% -0.80% (p=0.000 n=94+94)\r\n_findQueryKey/3 804ns ± 4% 798ns ± 5% -0.82% (p=0.000 n=90+94)\r\n_findQueryKey/4 3.85ns ± 2% 3.85ns ± 3% ~ (p=0.224 n=89+93)\r\n_findQueryKeyGoLib/0 664ns ± 4% 668ns ± 5% +0.67% (p=0.030 n=97+94)\r\n_findQueryKeyGoLib/1 359ns ± 6% 359ns ± 6% ~ (p=0.830 n=94+93)\r\n_findQueryKeyGoLib/2 2.24µs ± 3% 2.23µs ± 4% -0.37% (p=0.041 n=95+93)\r\n_findQueryKeyGoLib/3 2.94µs ± 4% 2.92µs ± 3% -0.68% (p=0.001 n=90+94)\r\n_findQueryKeyGoLib/4 3.63ns ± 4% 3.62ns ± 3% -0.38% (p=0.014 n=91+88)\r\n\r\nname old alloc/op new alloc/op delta\r\nMux 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nMuxSimple/default 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nMuxSimple/omit_route_from_ctx 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nMuxAlternativeInRegexp 2.62kB ± 0% 1.82kB ± 0% -30.49% (p=0.000 n=100+100)\r\nManyPathVariables 1.53kB ± 1% 1.13kB ± 0% -26.45% (p=0.000 n=99+93)\r\nPopulateContext/no_populated_vars 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nPopulateContext/empty_var 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nPopulateContext/populated_vars 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/static 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/dynamic 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\n_findQueryKey/0 0.00B 0.00B ~ (all equal)\r\n_findQueryKey/1 40.0B ± 0% 40.0B ± 0% ~ (all equal)\r\n_findQueryKey/2 483B ± 0% 483B ± 0% ~ (all equal)\r\n_findQueryKey/3 543B ± 0% 543B ± 0% ~ (all equal)\r\n_findQueryKey/4 0.00B 0.00B ~ (all equal)\r\n_findQueryKeyGoLib/0 864B ± 0% 864B ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/1 432B ± 0% 432B ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/2 1.54kB ± 0% 1.54kB ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/3 1.98kB ± 0% 1.98kB ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/4 0.00B 0.00B ~ (all equal)\r\n\r\nname old allocs/op new allocs/op delta\r\nMux 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nMuxSimple/default 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nMuxSimple/omit_route_from_ctx 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nMuxAlternativeInRegexp 20.0 ± 0% 16.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nManyPathVariables 14.0 ± 0% 12.0 ± 0% -14.29% (p=0.000 n=100+100)\r\nPopulateContext/no_populated_vars 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nPopulateContext/empty_var 11.0 ± 0% 9.0 ± 0% -18.18% (p=0.000 n=100+100)\r\nPopulateContext/populated_vars 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/static 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/dynamic 11.0 ± 0% 8.0 ± 0% -27.27% (p=0.000 n=100+100)\r\n_findQueryKey/0 0.00 0.00 ~ (all equal)\r\n_findQueryKey/1 3.00 ± 0% 3.00 ± 0% ~ (all equal)\r\n_findQueryKey/2 10.0 ± 0% 10.0 ± 0% ~ (all equal)\r\n_findQueryKey/3 11.0 ± 0% 11.0 ± 0% ~ (all equal)\r\n_findQueryKey/4 0.00 0.00 ~ (all equal)\r\n_findQueryKeyGoLib/0 8.00 ± 0% 8.00 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/1 4.00 ± 0% 4.00 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/2 24.0 ± 0% 24.0 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/3 28.0 ± 0% 28.0 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/4 0.00 0.00 ~ (all equal)\r\n```\r\n\r\n---\r\n\r\n
\r\n\r\n
\r\n Older Xeon Gold, 2.3 GHz \r\n\r\n(Actual CPU identifier is rather `Intel(R) Xeon(R) Gold 5122 CPU @\r\n2.30GHz`)\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/gorilla/mux\r\ncpu: Intel Xeon Processor (Skylake, IBRS) \r\n\r\nname old time/op new time/op delta\r\nMux 1.61µs ± 6% 1.43µs ± 6% -11.38% (p=0.000 n=97+96)\r\nMuxSimple/default 979ns ± 8% 508ns ± 7% -48.15% (p=0.000 n=93+98)\r\nMuxSimple/omit_route_from_ctx 1.00µs ±12% 0.22µs ± 4% -77.76% (p=0.000 n=99+96)\r\nMuxAlternativeInRegexp 2.40µs ± 9% 2.03µs ±12% -15.15% (p=0.000 n=94+98)\r\nManyPathVariables 2.77µs ± 8% 2.60µs ±12% -6.17% (p=0.000 n=94+99)\r\nPopulateContext/no_populated_vars 1.03µs ±11% 0.54µs ±13% -47.57% (p=0.000 n=94+98)\r\nPopulateContext/empty_var 1.35µs ± 6% 1.23µs ±11% -9.01% (p=0.000 n=95+96)\r\nPopulateContext/populated_vars 1.40µs ± 8% 1.30µs ±14% -6.98% (p=0.000 n=97+99)\r\nPopulateContext/omit_route_/static 989ns ± 7% 239ns ±10% -75.78% (p=0.000 n=99+99)\r\nPopulateContext/omit_route_/dynamic 1.34µs ± 7% 1.21µs ±15% -10.04% (p=0.000 n=95+99)\r\n_findQueryKey/0 242ns ± 8% 228ns ± 8% -6.00% (p=0.000 n=97+95)\r\n_findQueryKey/1 304ns ± 7% 309ns ± 9% +1.60% (p=0.002 n=97+97)\r\n_findQueryKey/2 1.08µs ± 8% 1.14µs ±10% +5.28% (p=0.000 n=99+97)\r\n_findQueryKey/3 1.20µs ± 6% 1.23µs ± 9% +2.03% (p=0.000 n=92+99)\r\n_findQueryKey/4 5.86ns ± 4% 5.89ns ± 5% +0.56% (p=0.041 n=93+96)\r\n_findQueryKeyGoLib/0 992ns ± 7% 1067ns ±11% +7.59% (p=0.000 n=94+98)\r\n_findQueryKeyGoLib/1 528ns ± 6% 571ns ±11% +8.04% (p=0.000 n=97+100)\r\n_findQueryKeyGoLib/2 3.46µs ± 6% 3.60µs ±10% +4.18% (p=0.000 n=96+95)\r\n_findQueryKeyGoLib/3 4.54µs ± 6% 4.75µs ±11% +4.62% (p=0.000 n=92+98)\r\n_findQueryKeyGoLib/4 5.50ns ± 4% 5.62ns ± 7% +2.14% (p=0.000 n=91+96)\r\n\r\nname old alloc/op new alloc/op delta\r\nMux 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nMuxSimple/default 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nMuxSimple/omit_route_from_ctx 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nMuxAlternativeInRegexp 2.62kB ± 0% 1.82kB ± 0% -30.49% (p=0.000 n=100+100)\r\nManyPathVariables 1.52kB ± 0% 1.12kB ± 0% -26.50% (p=0.000 n=92+97)\r\nPopulateContext/no_populated_vars 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nPopulateContext/empty_var 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nPopulateContext/populated_vars 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/static 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/dynamic 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\n_findQueryKey/0 0.00B 0.00B ~ (all equal)\r\n_findQueryKey/1 40.0B ± 0% 40.0B ± 0% ~ (all equal)\r\n_findQueryKey/2 483B ± 0% 483B ± 0% ~ (all equal)\r\n_findQueryKey/3 543B ± 0% 543B ± 0% ~ (all equal)\r\n_findQueryKey/4 0.00B 0.00B ~ (all equal)\r\n_findQueryKeyGoLib/0 864B ± 0% 864B ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/1 432B ± 0% 432B ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/2 1.54kB ± 0% 1.54kB ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/3 1.98kB ± 0% 1.98kB ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/4 0.00B 0.00B ~ (all equal)\r\n\r\nname old allocs/op new allocs/op delta\r\nMux 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nMuxSimple/default 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nMuxSimple/omit_route_from_ctx 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nMuxAlternativeInRegexp 20.0 ± 0% 16.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nManyPathVariables 14.0 ± 0% 12.0 ± 0% -14.29% (p=0.000 n=100+100)\r\nPopulateContext/no_populated_vars 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nPopulateContext/empty_var 11.0 ± 0% 9.0 ± 0% -18.18% (p=0.000 n=100+100)\r\nPopulateContext/populated_vars 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/static 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/dynamic 11.0 ± 0% 8.0 ± 0% -27.27% (p=0.000 n=100+100)\r\n_findQueryKey/0 0.00 0.00 ~ (all equal)\r\n_findQueryKey/1 3.00 ± 0% 3.00 ± 0% ~ (all equal)\r\n_findQueryKey/2 10.0 ± 0% 10.0 ± 0% ~ (all equal)\r\n_findQueryKey/3 11.0 ± 0% 11.0 ± 0% ~ (all equal)\r\n_findQueryKey/4 0.00 0.00 ~ (all equal)\r\n_findQueryKeyGoLib/0 8.00 ± 0% 8.00 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/1 4.00 ± 0% 4.00 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/2 24.0 ± 0% 24.0 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/3 28.0 ± 0% 28.0 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/4 0.00 0.00 ~ (all equal)\r\n```\r\n\r\n---\r\n\r\n
\r\n\r\n
\r\n Older Xeon E, 2.4 GHz \r\n\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/gorilla/mux\r\ncpu: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz\r\n\r\nname old time/op new time/op delta\r\nMux 1.81µs ±13% 1.57µs ±10% -13.50% (p=0.000 n=99+97)\r\nMuxSimple/default 1.09µs ± 8% 0.55µs ±10% -49.51% (p=0.000 n=96+95)\r\nMuxSimple/omit_route_from_ctx 1.08µs ±10% 0.25µs ± 8% -76.66% (p=0.000 n=95+94)\r\nMuxAlternativeInRegexp 2.59µs ±12% 2.14µs ±13% -17.06% (p=0.000 n=95+92)\r\nManyPathVariables 3.11µs ± 9% 2.78µs ±10% -10.62% (p=0.000 n=96+99)\r\nPopulateContext/no_populated_vars 1.09µs ± 9% 0.56µs ± 7% -48.63% (p=0.000 n=94+93)\r\nPopulateContext/empty_var 1.48µs ± 9% 1.28µs ±12% -13.52% (p=0.000 n=97+96)\r\nPopulateContext/populated_vars 1.56µs ±11% 1.34µs ±10% -13.84% (p=0.000 n=96+97)\r\nPopulateContext/omit_route_/static 1.08µs ± 9% 0.26µs ± 9% -75.89% (p=0.000 n=98+97)\r\nPopulateContext/omit_route_/dynamic 1.50µs ±11% 1.20µs ± 9% -19.96% (p=0.000 n=94+93)\r\n_findQueryKey/0 254ns ± 8% 243ns ± 8% -4.44% (p=0.000 n=96+91)\r\n_findQueryKey/1 336ns ± 7% 336ns ± 8% ~ (p=0.920 n=96+95)\r\n_findQueryKey/2 1.25µs ±12% 1.27µs ±14% +1.55% (p=0.043 n=97+98)\r\n_findQueryKey/3 1.37µs ± 8% 1.38µs ± 9% +0.97% (p=0.030 n=97+95)\r\n_findQueryKey/4 5.93ns ± 6% 5.97ns ± 7% ~ (p=0.074 n=97+97)\r\n_findQueryKeyGoLib/0 1.07µs ± 9% 1.13µs ±10% +4.99% (p=0.000 n=96+95)\r\n_findQueryKeyGoLib/1 581ns ± 8% 586ns ± 9% ~ (p=0.089 n=96+99)\r\n_findQueryKeyGoLib/2 3.93µs ±12% 3.80µs ±10% -3.31% (p=0.000 n=96+91)\r\n_findQueryKeyGoLib/3 5.18µs ±10% 5.06µs ± 8% -2.27% (p=0.000 n=98+99)\r\n_findQueryKeyGoLib/4 6.52ns ± 6% 6.49ns ± 4% ~ (p=0.232 n=96+94)\r\n\r\nname old alloc/op new alloc/op delta\r\nMux 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nMuxSimple/default 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nMuxSimple/omit_route_from_ctx 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nMuxAlternativeInRegexp 2.62kB ± 0% 1.82kB ± 0% -30.49% (p=0.000 n=100+100)\r\nManyPathVariables 1.52kB ± 0% 1.12kB ± 1% -26.58% (p=0.000 n=92+96)\r\nPopulateContext/no_populated_vars 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nPopulateContext/empty_var 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nPopulateContext/populated_vars 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/static 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/dynamic 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\n_findQueryKey/0 0.00B 0.00B ~ (all equal)\r\n_findQueryKey/1 40.0B ± 0% 40.0B ± 0% ~ (all equal)\r\n_findQueryKey/2 483B ± 0% 483B ± 0% ~ (all equal)\r\n_findQueryKey/3 543B ± 0% 543B ± 0% ~ (all equal)\r\n_findQueryKey/4 0.00B 0.00B ~ (all equal)\r\n_findQueryKeyGoLib/0 864B ± 0% 864B ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/1 432B ± 0% 432B ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/2 1.54kB ± 0% 1.54kB ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/3 1.98kB ± 0% 1.98kB ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/4 0.00B 0.00B ~ (all equal)\r\n\r\nname old allocs/op new allocs/op delta\r\nMux 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nMuxSimple/default 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nMuxSimple/omit_route_from_ctx 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nMuxAlternativeInRegexp 20.0 ± 0% 16.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nManyPathVariables 14.0 ± 0% 12.0 ± 0% -14.29% (p=0.000 n=100+100)\r\nPopulateContext/no_populated_vars 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nPopulateContext/empty_var 11.0 ± 0% 9.0 ± 0% -18.18% (p=0.000 n=100+100)\r\nPopulateContext/populated_vars 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/static 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nPopulateContext/omit_route_/dynamic 11.0 ± 0% 8.0 ± 0% -27.27% (p=0.000 n=100+100)\r\n_findQueryKey/0 0.00 0.00 ~ (all equal)\r\n_findQueryKey/1 3.00 ± 0% 3.00 ± 0% ~ (all equal)\r\n_findQueryKey/2 10.0 ± 0% 10.0 ± 0% ~ (all equal)\r\n_findQueryKey/3 11.0 ± 0% 11.0 ± 0% ~ (all equal)\r\n_findQueryKey/4 0.00 0.00 ~ (all equal)\r\n_findQueryKeyGoLib/0 8.00 ± 0% 8.00 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/1 4.00 ± 0% 4.00 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/2 24.0 ± 0% 24.0 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/3 28.0 ± 0% 28.0 ± 0% ~ (all equal)\r\n_findQueryKeyGoLib/4 0.00 0.00 ~ (all equal)\r\n```\r\n\r\n---\r\n\r\n
\r\n\r\n---\r\n\r\n
\r\n\r\n\r\n
\r\n Popular go-http-routing-benchmark \r\n\r\nI pushed three branches for comparison to my fork:\r\nhttps://github.com/das7pad/go-http-routing-benchmark\r\n\r\n- `before`, this is the baseline branch mentioned above\r\n- `after`, this is the PR revision\r\n- `after-omit-route`, like `after` with the `OmitRouteFromContext` flag\r\nenabled\r\n\r\nYou can reproduce these benchmarks using docker, pinned to CPU 1:\r\n\r\n```bash\r\ndocker run --rm --pull always -v /logs:/logs --cpuset-cpus 1 -d golang:1.18 bash -exc 'git clone https://github.com/das7pad/go-http-routing-benchmark.git && cd go-http-routing-benchmark && for branch in before after after-omit-route; do git checkout \"$branch\" && go test -benchmem -bench Gorilla -count 100 -timeout 1h > \"/logs/$branch.txt\"; done; go install golang.org/x/perf/cmd/benchstat@latest; benchstat /logs/before.txt /logs/after.txt > /logs/compare-before-vs-after.txt; benchstat /logs/before.txt /logs/after-omit-route.txt > /logs/compare-before-vs-after-omit-route.txt'\r\n```\r\n\r\n
\r\n Modern Xeon E, 3.4 GHz \r\n\r\nBefore vs After with omit Route flag enabled\r\n\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/gorilla/mux\r\ncpu: Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz\r\n\r\nname old time/op new time/op delta\r\nGorillaMux_Param 1.86µs ±13% 1.37µs ± 6% -26.08% (p=0.000 n=94+96)\r\nGorillaMux_Param5 2.61µs ± 4% 2.20µs ± 4% -15.92% (p=0.000 n=89+95)\r\nGorillaMux_Param20 6.13µs ± 3% 3.98µs ± 4% -35.07% (p=0.000 n=90+94)\r\nGorillaMux_ParamWrite 1.87µs ± 5% 1.43µs ± 8% -23.51% (p=0.000 n=95+92)\r\nGorillaMux_GithubStatic 3.77µs ± 5% 2.43µs ± 4% -35.40% (p=0.000 n=96+96)\r\nGorillaMux_GithubParam 5.68µs ± 6% 5.21µs ± 5% -8.32% (p=0.000 n=93+93)\r\nGorillaMux_GithubAll 2.86ms ± 6% 2.71ms ± 4% -5.44% (p=0.000 n=99+96)\r\nGorillaMux_GPlusStatic 1.31µs ± 5% 0.21µs ± 4% -84.29% (p=0.000 n=92+95)\r\nGorillaMux_GPlusParam 2.37µs ± 3% 1.96µs ± 2% -17.42% (p=0.000 n=96+94)\r\nGorillaMux_GPlus2Params 4.43µs ± 3% 3.90µs ± 3% -11.89% (p=0.000 n=91+90)\r\nGorillaMux_GPlusAll 37.1µs ± 6% 28.9µs ± 5% -22.26% (p=0.000 n=93+92)\r\nGorillaMux_ParseStatic 1.55µs ± 5% 0.42µs ± 4% -72.78% (p=0.000 n=95+91)\r\nGorillaMux_ParseParam 1.88µs ± 7% 1.41µs ± 7% -24.66% (p=0.000 n=94+93)\r\nGorillaMux_Parse2Params 2.21µs ± 4% 1.74µs ± 6% -21.16% (p=0.000 n=94+96)\r\nGorillaMux_ParseAll 71.8µs ± 4% 51.3µs ± 4% -28.51% (p=0.000 n=93+94)\r\nGorillaMux_StaticAll 771µs ± 4% 492µs ± 3% -36.17% (p=0.000 n=95+90)\r\n\r\nname old alloc/op new alloc/op delta\r\nGorillaMux_Param 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_Param5 1.38kB ± 0% 0.93kB ± 0% -32.56% (p=0.000 n=100+100)\r\nGorillaMux_Param20 3.48kB ± 0% 2.10kB ± 0% -39.86% (p=0.000 n=100+80)\r\nGorillaMux_ParamWrite 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 258kB ± 0% 149kB ± 0% -42.37% (p=0.000 n=86+99)\r\nGorillaMux_GPlusStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 16.5kB ± 0% 9.7kB ± 0% -41.43% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 31.1kB ± 0% 14.4kB ± 0% -53.88% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 158kB ± 0% 8kB ± 0% -95.24% (p=0.000 n=100+100)\r\n\r\nname old allocs/op new allocs/op delta\r\nGorillaMux_Param 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_Param5 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_Param20 12.0 ± 0% 7.0 ± 0% -41.67% (p=0.000 n=100+100)\r\nGorillaMux_ParamWrite 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 1.99k ± 0% 1.21k ± 0% -39.57% (p=0.000 n=100+100)\r\nGorillaMux_GPlusStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 128 ± 0% 79 ± 0% -38.28% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 250 ± 0% 122 ± 0% -51.20% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 1.41k ± 0% 0.16k ± 0% -88.89% (p=0.000 n=100+100)\r\n```\r\n\r\nBefore vs After\r\n\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/gorilla/mux\r\ncpu: Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz\r\n\r\nname old time/op new time/op delta\r\nGorillaMux_Param 1.86µs ±13% 1.47µs ±11% -21.05% (p=0.000 n=94+93)\r\nGorillaMux_Param5 2.61µs ± 4% 2.25µs ± 2% -13.64% (p=0.000 n=89+90)\r\nGorillaMux_Param20 6.13µs ± 3% 4.05µs ± 4% -33.96% (p=0.000 n=90+91)\r\nGorillaMux_ParamWrite 1.87µs ± 5% 1.47µs ± 4% -21.03% (p=0.000 n=95+96)\r\nGorillaMux_GithubStatic 3.77µs ± 5% 3.16µs ± 3% -16.11% (p=0.000 n=96+95)\r\nGorillaMux_GithubParam 5.68µs ± 6% 5.31µs ± 6% -6.57% (p=0.000 n=93+94)\r\nGorillaMux_GithubAll 2.86ms ± 6% 2.72ms ± 4% -4.97% (p=0.000 n=99+95)\r\nGorillaMux_GPlusStatic 1.31µs ± 5% 0.66µs ± 6% -49.50% (p=0.000 n=92+95)\r\nGorillaMux_GPlusParam 2.37µs ± 3% 2.04µs ± 4% -13.87% (p=0.000 n=96+90)\r\nGorillaMux_GPlus2Params 4.43µs ± 3% 3.98µs ± 5% -10.21% (p=0.000 n=91+92)\r\nGorillaMux_GPlusAll 37.1µs ± 6% 30.6µs ± 6% -17.65% (p=0.000 n=93+94)\r\nGorillaMux_ParseStatic 1.55µs ± 5% 0.90µs ± 4% -41.88% (p=0.000 n=95+91)\r\nGorillaMux_ParseParam 1.88µs ± 7% 1.47µs ± 6% -21.53% (p=0.000 n=94+95)\r\nGorillaMux_Parse2Params 2.21µs ± 4% 1.80µs ± 5% -18.26% (p=0.000 n=94+90)\r\nGorillaMux_ParseAll 71.8µs ± 4% 57.9µs ± 3% -19.30% (p=0.000 n=93+97)\r\nGorillaMux_StaticAll 771µs ± 4% 664µs ± 4% -13.87% (p=0.000 n=95+95)\r\n\r\nname old alloc/op new alloc/op delta\r\nGorillaMux_Param 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_Param5 1.38kB ± 0% 0.98kB ± 0% -29.07% (p=0.000 n=100+100)\r\nGorillaMux_Param20 3.48kB ± 0% 2.14kB ± 0% -38.48% (p=0.000 n=100+83)\r\nGorillaMux_ParamWrite 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 258kB ± 0% 173kB ± 0% -33.02% (p=0.000 n=86+100)\r\nGorillaMux_GPlusStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 16.5kB ± 0% 11.1kB ± 0% -32.82% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 31.1kB ± 0% 19.6kB ± 0% -37.02% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 158kB ± 0% 78kB ± 0% -50.79% (p=0.000 n=100+100)\r\n\r\nname old allocs/op new allocs/op delta\r\nGorillaMux_Param 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_Param5 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_Param20 12.0 ± 0% 8.0 ± 0% -33.33% (p=0.000 n=100+100)\r\nGorillaMux_ParamWrite 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 1.99k ± 0% 1.48k ± 0% -25.78% (p=0.000 n=100+100)\r\nGorillaMux_GPlusStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 128 ± 0% 96 ± 0% -25.00% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 250 ± 0% 168 ± 0% -32.80% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 1.41k ± 0% 0.63k ± 0% -55.56% (p=0.000 n=100+100)\r\n```\r\n\r\n---\r\n\r\n
\r\n\r\n\r\n
\r\n Older Xeon Gold, 2.3 GHz \r\n\r\nBefore vs After with omit Route flag enabled\r\n\r\n(Actual CPU identifier is rather `Intel(R) Xeon(R) Gold 5122 CPU @\r\n2.30GHz`)\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/gorilla/mux\r\ncpu: Intel Xeon Processor (Skylake, IBRS)\r\n\r\nname old time/op new time/op delta\r\nGorillaMux_Param 3.02µs ±14% 2.24µs ±12% -25.60% (p=0.000 n=100+99)\r\nGorillaMux_Param5 4.20µs ±12% 3.45µs ±10% -17.84% (p=0.000 n=95+97)\r\nGorillaMux_Param20 9.86µs ±12% 6.36µs ± 9% -35.54% (p=0.000 n=96+93)\r\nGorillaMux_ParamWrite 2.97µs ± 7% 2.21µs ± 5% -25.40% (p=0.000 n=96+96)\r\nGorillaMux_GithubStatic 5.82µs ± 6% 3.62µs ± 5% -37.87% (p=0.000 n=99+98)\r\nGorillaMux_GithubParam 8.81µs ± 7% 7.90µs ± 5% -10.37% (p=0.000 n=97+95)\r\nGorillaMux_GithubAll 3.93ms ± 4% 3.62ms ± 6% -7.72% (p=0.000 n=97+99)\r\nGorillaMux_GPlusStatic 2.04µs ± 7% 0.33µs ± 9% -83.77% (p=0.000 n=98+99)\r\nGorillaMux_GPlusParam 3.72µs ± 6% 3.14µs ±13% -15.44% (p=0.000 n=99+99)\r\nGorillaMux_GPlus2Params 6.89µs ± 8% 6.57µs ± 9% -4.70% (p=0.000 n=92+98)\r\nGorillaMux_GPlusAll 56.1µs ± 6% 46.5µs ±11% -17.14% (p=0.000 n=95+98)\r\nGorillaMux_ParseStatic 2.43µs ± 6% 0.67µs ±11% -72.49% (p=0.000 n=96+99)\r\nGorillaMux_ParseParam 2.91µs ± 8% 2.29µs ±12% -21.07% (p=0.000 n=98+97)\r\nGorillaMux_Parse2Params 3.44µs ± 8% 2.84µs ± 8% -17.53% (p=0.000 n=98+95)\r\nGorillaMux_ParseAll 111µs ± 5% 80µs ±11% -27.91% (p=0.000 n=96+98)\r\nGorillaMux_StaticAll 1.13ms ± 4% 0.71ms ± 5% -37.32% (p=0.000 n=97+97)\r\n\r\nname old alloc/op new alloc/op delta\r\nGorillaMux_Param 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_Param5 1.38kB ± 0% 0.93kB ± 0% -32.56% (p=0.000 n=100+100)\r\nGorillaMux_Param20 3.48kB ± 0% 2.10kB ± 0% -39.86% (p=0.000 n=100+79)\r\nGorillaMux_ParamWrite 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 258kB ± 0% 149kB ± 0% -42.37% (p=0.000 n=80+96)\r\nGorillaMux_GPlusStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 16.5kB ± 0% 9.7kB ± 0% -41.43% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 31.1kB ± 0% 14.4kB ± 0% -53.88% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 158kB ± 0% 8kB ± 0% -95.24% (p=0.000 n=100+100)\r\n\r\nname old allocs/op new allocs/op delta\r\nGorillaMux_Param 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_Param5 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_Param20 12.0 ± 0% 7.0 ± 0% -41.67% (p=0.000 n=100+100)\r\nGorillaMux_ParamWrite 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 1.99k ± 0% 1.21k ± 0% -39.57% (p=0.000 n=100+100)\r\nGorillaMux_GPlusStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 128 ± 0% 79 ± 0% -38.28% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 250 ± 0% 122 ± 0% -51.20% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 1.41k ± 0% 0.16k ± 0% -88.89% (p=0.000 n=100+100)\r\n```\r\n\r\nBefore vs After\r\n\r\n(Actual CPU identifier is rather `Intel(R) Xeon(R) Gold 5122 CPU @\r\n2.30GHz`)\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/gorilla/mux\r\ncpu: Intel Xeon Processor (Skylake, IBRS) \r\n\r\nname old time/op new time/op delta\r\nGorillaMux_Param 3.02µs ±14% 2.27µs ± 8% -24.70% (p=0.000 n=100+98)\r\nGorillaMux_Param5 4.20µs ±12% 3.48µs ± 5% -17.29% (p=0.000 n=95+98)\r\nGorillaMux_Param20 9.86µs ±12% 6.41µs ± 6% -35.05% (p=0.000 n=96+92)\r\nGorillaMux_ParamWrite 2.97µs ± 7% 2.31µs ± 6% -22.12% (p=0.000 n=96+98)\r\nGorillaMux_GithubStatic 5.82µs ± 6% 4.69µs ± 5% -19.52% (p=0.000 n=99+96)\r\nGorillaMux_GithubParam 8.81µs ± 7% 7.98µs ± 4% -9.48% (p=0.000 n=97+96)\r\nGorillaMux_GithubAll 3.93ms ± 4% 3.64ms ± 5% -7.18% (p=0.000 n=97+94)\r\nGorillaMux_GPlusStatic 2.04µs ± 7% 1.05µs ±12% -48.53% (p=0.000 n=98+94)\r\nGorillaMux_GPlusParam 3.72µs ± 6% 3.09µs ± 5% -16.76% (p=0.000 n=99+96)\r\nGorillaMux_GPlus2Params 6.89µs ± 8% 6.18µs ± 5% -10.28% (p=0.000 n=92+95)\r\nGorillaMux_GPlusAll 56.1µs ± 6% 46.0µs ± 5% -17.98% (p=0.000 n=95+93)\r\nGorillaMux_ParseStatic 2.43µs ± 6% 1.44µs ± 5% -40.52% (p=0.000 n=96+95)\r\nGorillaMux_ParseParam 2.91µs ± 8% 2.30µs ± 5% -20.93% (p=0.000 n=98+98)\r\nGorillaMux_Parse2Params 3.44µs ± 8% 2.82µs ± 7% -18.04% (p=0.000 n=98+94)\r\nGorillaMux_ParseAll 111µs ± 5% 91µs ±13% -18.12% (p=0.000 n=96+98)\r\nGorillaMux_StaticAll 1.13ms ± 4% 0.95ms ± 9% -16.38% (p=0.000 n=97+96)\r\n\r\nname old alloc/op new alloc/op delta\r\nGorillaMux_Param 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_Param5 1.38kB ± 0% 0.98kB ± 0% -29.07% (p=0.000 n=100+100)\r\nGorillaMux_Param20 3.48kB ± 0% 2.14kB ± 0% -38.49% (p=0.000 n=100+100)\r\nGorillaMux_ParamWrite 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 258kB ± 0% 173kB ± 0% -33.02% (p=0.000 n=80+100)\r\nGorillaMux_GPlusStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 16.5kB ± 0% 11.1kB ± 0% -32.82% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 31.1kB ± 0% 19.6kB ± 0% -37.02% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 158kB ± 0% 78kB ± 0% -50.79% (p=0.000 n=100+95)\r\n\r\nname old allocs/op new allocs/op delta\r\nGorillaMux_Param 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_Param5 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_Param20 12.0 ± 0% 8.0 ± 0% -33.33% (p=0.000 n=100+100)\r\nGorillaMux_ParamWrite 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 1.99k ± 0% 1.48k ± 0% -25.78% (p=0.000 n=100+100)\r\nGorillaMux_GPlusStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 128 ± 0% 96 ± 0% -25.00% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 250 ± 0% 168 ± 0% -32.80% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 1.41k ± 0% 0.63k ± 0% -55.56% (p=0.000 n=100+100)\r\n```\r\n\r\n---\r\n\r\n
\r\n\r\n\r\n\r\n
\r\n Older Xeon E, 2.4 GHz \r\n\r\nBefore vs After with omit Route flag enabled\r\n\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/gorilla/mux\r\ncpu: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz\r\n\r\nname old time/op new time/op delta\r\nGorillaMux_Param 3.31µs ±11% 2.44µs ±11% -26.34% (p=0.000 n=95+92)\r\nGorillaMux_Param5 4.68µs ± 9% 3.96µs ±14% -15.22% (p=0.000 n=97+100)\r\nGorillaMux_Param20 11.1µs ±10% 7.2µs ± 9% -35.03% (p=0.000 n=100+97)\r\nGorillaMux_ParamWrite 3.37µs ±10% 2.56µs ± 8% -24.21% (p=0.000 n=95+94)\r\nGorillaMux_GithubStatic 6.90µs ± 7% 3.85µs ± 8% -44.16% (p=0.000 n=96+91)\r\nGorillaMux_GithubParam 9.85µs ± 6% 8.89µs ±11% -9.74% (p=0.000 n=98+96)\r\nGorillaMux_GithubAll 5.15ms ±10% 4.77ms ± 7% -7.36% (p=0.000 n=96+96)\r\nGorillaMux_GPlusStatic 2.38µs ± 8% 0.36µs ± 7% -84.98% (p=0.000 n=95+94)\r\nGorillaMux_GPlusParam 4.30µs ±11% 3.33µs ±10% -22.60% (p=0.000 n=97+95)\r\nGorillaMux_GPlus2Params 7.80µs ± 8% 6.82µs ±10% -12.55% (p=0.000 n=98+94)\r\nGorillaMux_GPlusAll 65.8µs ±10% 50.5µs ±10% -23.24% (p=0.000 n=97+98)\r\nGorillaMux_ParseStatic 2.98µs ±10% 0.70µs ± 9% -76.68% (p=0.000 n=99+94)\r\nGorillaMux_ParseParam 3.31µs ± 9% 2.55µs ± 9% -23.11% (p=0.000 n=96+95)\r\nGorillaMux_Parse2Params 3.92µs ± 8% 3.18µs ±12% -18.86% (p=0.000 n=97+96)\r\nGorillaMux_ParseAll 125µs ± 9% 90µs ±12% -28.23% (p=0.000 n=99+96)\r\nGorillaMux_StaticAll 1.32ms ± 6% 0.79ms ± 6% -40.41% (p=0.000 n=99+95)\r\n\r\nname old alloc/op new alloc/op delta\r\nGorillaMux_Param 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_Param5 1.38kB ± 0% 0.93kB ± 0% -32.56% (p=0.000 n=100+100)\r\nGorillaMux_Param20 3.48kB ± 0% 2.10kB ± 0% -39.86% (p=0.000 n=100+79)\r\nGorillaMux_ParamWrite 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 258kB ± 0% 149kB ± 0% -42.37% (p=0.000 n=79+86)\r\nGorillaMux_GPlusStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 16.5kB ± 0% 9.7kB ± 0% -41.43% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 31.1kB ± 0% 14.4kB ± 0% -53.88% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 158kB ± 0% 8kB ± 0% -95.24% (p=0.000 n=100+100)\r\n\r\nname old allocs/op new allocs/op delta\r\nGorillaMux_Param 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_Param5 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_Param20 12.0 ± 0% 7.0 ± 0% -41.67% (p=0.000 n=100+100)\r\nGorillaMux_ParamWrite 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 1.99k ± 0% 1.21k ± 0% -39.57% (p=0.000 n=100+100)\r\nGorillaMux_GPlusStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 128 ± 0% 79 ± 0% -38.28% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 250 ± 0% 122 ± 0% -51.20% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 1.41k ± 0% 0.16k ± 0% -88.89% (p=0.000 n=100+100)\r\n```\r\n\r\nBefore vs After\r\n\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/gorilla/mux\r\ncpu: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz\r\n\r\nname old time/op new time/op delta\r\nGorillaMux_Param 3.31µs ±11% 2.59µs ±12% -21.76% (p=0.000 n=95+96)\r\nGorillaMux_Param5 4.68µs ± 9% 3.80µs ± 7% -18.79% (p=0.000 n=97+92)\r\nGorillaMux_Param20 11.1µs ±10% 7.2µs ± 9% -35.19% (p=0.000 n=100+99)\r\nGorillaMux_ParamWrite 3.37µs ±10% 2.68µs ± 7% -20.69% (p=0.000 n=95+95)\r\nGorillaMux_GithubStatic 6.90µs ± 7% 5.06µs ± 7% -26.57% (p=0.000 n=96+91)\r\nGorillaMux_GithubParam 9.85µs ± 6% 8.83µs ± 9% -10.42% (p=0.000 n=98+98)\r\nGorillaMux_GithubAll 5.15ms ±10% 4.71ms ± 9% -8.50% (p=0.000 n=96+97)\r\nGorillaMux_GPlusStatic 2.38µs ± 8% 1.19µs ±10% -50.24% (p=0.000 n=95+100)\r\nGorillaMux_GPlusParam 4.30µs ±11% 3.40µs ± 5% -21.08% (p=0.000 n=97+96)\r\nGorillaMux_GPlus2Params 7.80µs ± 8% 6.96µs ± 8% -10.71% (p=0.000 n=98+98)\r\nGorillaMux_GPlusAll 65.8µs ±10% 52.2µs ±10% -20.65% (p=0.000 n=97+96)\r\nGorillaMux_ParseStatic 2.98µs ±10% 1.61µs ±10% -46.04% (p=0.000 n=99+100)\r\nGorillaMux_ParseParam 3.31µs ± 9% 2.63µs ± 7% -20.46% (p=0.000 n=96+91)\r\nGorillaMux_Parse2Params 3.92µs ± 8% 3.23µs ± 6% -17.58% (p=0.000 n=97+93)\r\nGorillaMux_ParseAll 125µs ± 9% 102µs ± 9% -18.79% (p=0.000 n=99+96)\r\nGorillaMux_StaticAll 1.32ms ± 6% 1.07ms ± 7% -18.78% (p=0.000 n=99+95)\r\n\r\nname old alloc/op new alloc/op delta\r\nGorillaMux_Param 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_Param5 1.38kB ± 0% 0.98kB ± 0% -29.07% (p=0.000 n=100+100)\r\nGorillaMux_Param20 3.48kB ± 0% 2.14kB ± 0% -38.49% (p=0.000 n=100+100)\r\nGorillaMux_ParamWrite 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 258kB ± 0% 173kB ± 0% -33.02% (p=0.000 n=79+96)\r\nGorillaMux_GPlusStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 16.5kB ± 0% 11.1kB ± 0% -32.82% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 31.1kB ± 0% 19.6kB ± 0% -37.02% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 158kB ± 0% 78kB ± 0% -50.79% (p=0.000 n=100+100)\r\n\r\nname old allocs/op new allocs/op delta\r\nGorillaMux_Param 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_Param5 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_Param20 12.0 ± 0% 8.0 ± 0% -33.33% (p=0.000 n=100+100)\r\nGorillaMux_ParamWrite 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nGorillaMux_GithubParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GithubAll 1.99k ± 0% 1.48k ± 0% -25.78% (p=0.000 n=100+100)\r\nGorillaMux_GPlusStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nGorillaMux_GPlusParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlus2Params 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_GPlusAll 128 ± 0% 96 ± 0% -25.00% (p=0.000 n=100+100)\r\nGorillaMux_ParseStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=100+100)\r\nGorillaMux_ParseParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_Parse2Params 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=100+100)\r\nGorillaMux_ParseAll 250 ± 0% 168 ± 0% -32.80% (p=0.000 n=100+100)\r\nGorillaMux_StaticAll 1.41k ± 0% 0.63k ± 0% -55.56% (p=0.000 n=100+100)\r\n```\r\n\r\n---\r\n\r\n
\r\n\r\n\r\n
\r\n Older i7, frequency scaling around 3.4 GHz, n=10 \r\n\r\nSorry, only 10 iterations each. I do not want to hear the fan for too\r\nlong :)\r\n\r\nBefore vs After with omit Route flag enabled\r\n\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/julienschmidt/go-http-routing-benchmark\r\ncpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz\r\n\r\nname old time/op new time/op delta\r\nGorillaMux_Param 1.80µs ± 2% 1.41µs ± 3% -21.64% (p=0.000 n=10+10)\r\nGorillaMux_Param5 2.68µs ± 0% 2.34µs ± 1% -12.43% (p=0.000 n=10+10)\r\nGorillaMux_Param20 5.92µs ± 0% 4.02µs ± 0% -32.10% (p=0.000 n=10+9)\r\nGorillaMux_ParamWrite 1.89µs ± 1% 1.47µs ± 0% -22.22% (p=0.000 n=9+8)\r\nGorillaMux_GithubStatic 4.05µs ± 1% 2.80µs ± 0% -31.04% (p=0.000 n=9+10)\r\nGorillaMux_GithubParam 6.30µs ± 1% 5.90µs ± 1% -6.27% (p=0.000 n=10+10)\r\nGorillaMux_GithubAll 3.14ms ± 1% 2.87ms ± 2% -8.42% (p=0.000 n=10+10)\r\nGorillaMux_GPlusStatic 1.29µs ± 1% 0.23µs ± 1% -82.37% (p=0.000 n=10+10)\r\nGorillaMux_GPlusParam 2.52µs ± 0% 2.07µs ± 1% -17.69% (p=0.000 n=10+10)\r\nGorillaMux_GPlus2Params 4.92µs ± 0% 4.49µs ± 1% -8.71% (p=0.000 n=10+10)\r\nGorillaMux_GPlusAll 39.0µs ± 1% 31.5µs ± 1% -19.28% (p=0.000 n=10+10)\r\nGorillaMux_ParseStatic 1.58µs ± 1% 0.47µs ± 1% -70.01% (p=0.000 n=10+10)\r\nGorillaMux_ParseParam 1.89µs ± 0% 1.46µs ± 1% -22.70% (p=0.000 n=10+10)\r\nGorillaMux_Parse2Params 2.31µs ± 2% 1.87µs ± 0% -18.96% (p=0.000 n=10+8)\r\nGorillaMux_ParseAll 74.3µs ± 1% 55.4µs ± 0% -25.48% (p=0.000 n=10+10)\r\nGorillaMux_StaticAll 797µs ± 0% 561µs ± 1% -29.66% (p=0.000 n=10+10)\r\n\r\nname old alloc/op new alloc/op delta\r\nGorillaMux_Param 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=10+10)\r\nGorillaMux_Param5 1.38kB ± 0% 0.93kB ± 0% -32.56% (p=0.000 n=10+10)\r\nGorillaMux_Param20 3.48kB ± 0% 2.09kB ± 0% -39.87% (p=0.000 n=10+10)\r\nGorillaMux_ParamWrite 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=10+10)\r\nGorillaMux_GithubStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=10+10)\r\nGorillaMux_GithubParam 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=10+10)\r\nGorillaMux_GithubAll 258kB ± 0% 149kB ± 0% -42.37% (p=0.000 n=10+9)\r\nGorillaMux_GPlusStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=10+10)\r\nGorillaMux_GPlusParam 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=10+10)\r\nGorillaMux_GPlus2Params 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=10+10)\r\nGorillaMux_GPlusAll 16.5kB ± 0% 9.7kB ± 0% -41.43% (p=0.000 n=10+10)\r\nGorillaMux_ParseStatic 1.01kB ± 0% 0.05kB ± 0% -95.24% (p=0.000 n=10+10)\r\nGorillaMux_ParseParam 1.31kB ± 0% 0.86kB ± 0% -34.15% (p=0.000 n=10+10)\r\nGorillaMux_Parse2Params 1.33kB ± 0% 0.88kB ± 0% -33.73% (p=0.000 n=10+10)\r\nGorillaMux_ParseAll 31.1kB ± 0% 14.4kB ± 0% -53.88% (p=0.000 n=10+10)\r\nGorillaMux_StaticAll 158kB ± 0% 8kB ± 0% -95.24% (p=0.000 n=10+10)\r\n\r\nname old allocs/op new allocs/op delta\r\nGorillaMux_Param 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=10+10)\r\nGorillaMux_Param5 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=10+10)\r\nGorillaMux_Param20 12.0 ± 0% 7.0 ± 0% -41.67% (p=0.000 n=10+10)\r\nGorillaMux_ParamWrite 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=10+10)\r\nGorillaMux_GithubStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=10+10)\r\nGorillaMux_GithubParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=10+10)\r\nGorillaMux_GithubAll 1.99k ± 0% 1.21k ± 0% -39.57% (p=0.000 n=10+10)\r\nGorillaMux_GPlusStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=10+10)\r\nGorillaMux_GPlusParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=10+10)\r\nGorillaMux_GPlus2Params 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=10+10)\r\nGorillaMux_GPlusAll 128 ± 0% 79 ± 0% -38.28% (p=0.000 n=10+10)\r\nGorillaMux_ParseStatic 9.00 ± 0% 1.00 ± 0% -88.89% (p=0.000 n=10+10)\r\nGorillaMux_ParseParam 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=10+10)\r\nGorillaMux_Parse2Params 10.0 ± 0% 7.0 ± 0% -30.00% (p=0.000 n=10+10)\r\nGorillaMux_ParseAll 250 ± 0% 122 ± 0% -51.20% (p=0.000 n=10+10)\r\nGorillaMux_StaticAll 1.41k ± 0% 0.16k ± 0% -88.89% (p=0.000 n=10+10)\r\n```\r\n\r\nBefore vs After\r\n```\r\ngoos: linux\r\ngoarch: amd64\r\npkg: github.com/julienschmidt/go-http-routing-benchmark\r\ncpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz\r\n\r\nname old time/op new time/op delta\r\nGorillaMux_Param 1.80µs ± 2% 1.38µs ± 2% -23.29% (p=0.000 n=10+10)\r\nGorillaMux_Param5 2.68µs ± 0% 2.29µs ± 1% -14.51% (p=0.000 n=10+10)\r\nGorillaMux_Param20 5.92µs ± 0% 3.95µs ± 1% -33.32% (p=0.000 n=10+10)\r\nGorillaMux_ParamWrite 1.89µs ± 1% 1.46µs ± 2% -22.59% (p=0.000 n=9+10)\r\nGorillaMux_GithubStatic 4.05µs ± 1% 3.41µs ± 1% -15.89% (p=0.000 n=9+9)\r\nGorillaMux_GithubParam 6.30µs ± 1% 5.80µs ± 1% -7.91% (p=0.000 n=10+10)\r\nGorillaMux_GithubAll 3.14ms ± 1% 2.89ms ± 1% -7.79% (p=0.000 n=10+10)\r\nGorillaMux_GPlusStatic 1.29µs ± 1% 0.65µs ± 1% -49.87% (p=0.000 n=10+10)\r\nGorillaMux_GPlusParam 2.52µs ± 0% 2.14µs ± 1% -15.03% (p=0.000 n=10+10)\r\nGorillaMux_GPlus2Params 4.92µs ± 0% 4.46µs ± 1% -9.40% (p=0.000 n=10+10)\r\nGorillaMux_GPlusAll 39.0µs ± 1% 33.0µs ± 1% -15.53% (p=0.000 n=10+10)\r\nGorillaMux_ParseStatic 1.58µs ± 1% 0.93µs ± 1% -41.36% (p=0.000 n=10+10)\r\nGorillaMux_ParseParam 1.89µs ± 0% 1.51µs ± 2% -20.23% (p=0.000 n=10+9)\r\nGorillaMux_Parse2Params 2.31µs ± 2% 1.92µs ± 1% -16.95% (p=0.000 n=10+10)\r\nGorillaMux_ParseAll 74.3µs ± 1% 60.9µs ± 1% -17.99% (p=0.000 n=10+10)\r\nGorillaMux_StaticAll 797µs ± 0% 699µs ± 0% -12.25% (p=0.000 n=10+10)\r\n\r\nname old alloc/op new alloc/op delta\r\nGorillaMux_Param 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=10+10)\r\nGorillaMux_Param5 1.38kB ± 0% 0.98kB ± 0% -29.07% (p=0.000 n=10+10)\r\nGorillaMux_Param20 3.48kB ± 0% 2.14kB ± 0% -38.48% (p=0.000 n=10+10)\r\nGorillaMux_ParamWrite 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=10+10)\r\nGorillaMux_GithubStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=10+10)\r\nGorillaMux_GithubParam 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=10+10)\r\nGorillaMux_GithubAll 258kB ± 0% 173kB ± 0% -33.02% (p=0.000 n=10+10)\r\nGorillaMux_GPlusStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=10+10)\r\nGorillaMux_GPlusParam 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=10+10)\r\nGorillaMux_GPlus2Params 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=10+10)\r\nGorillaMux_GPlusAll 16.5kB ± 0% 11.1kB ± 0% -32.82% (p=0.000 n=10+10)\r\nGorillaMux_ParseStatic 1.01kB ± 0% 0.50kB ± 0% -50.79% (p=0.000 n=10+10)\r\nGorillaMux_ParseParam 1.31kB ± 0% 0.91kB ± 0% -30.49% (p=0.000 n=10+10)\r\nGorillaMux_Parse2Params 1.33kB ± 0% 0.93kB ± 0% -30.12% (p=0.000 n=10+10)\r\nGorillaMux_ParseAll 31.1kB ± 0% 19.6kB ± 0% -37.02% (p=0.000 n=10+10)\r\nGorillaMux_StaticAll 158kB ± 0% 78kB ± 0% -50.79% (p=0.000 n=10+10)\r\n\r\nname old allocs/op new allocs/op delta\r\nGorillaMux_Param 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=10+10)\r\nGorillaMux_Param5 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=10+10)\r\nGorillaMux_Param20 12.0 ± 0% 8.0 ± 0% -33.33% (p=0.000 n=10+10)\r\nGorillaMux_ParamWrite 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=10+10)\r\nGorillaMux_GithubStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=10+10)\r\nGorillaMux_GithubParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=10+10)\r\nGorillaMux_GithubAll 1.99k ± 0% 1.48k ± 0% -25.78% (p=0.000 n=10+10)\r\nGorillaMux_GPlusStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=10+10)\r\nGorillaMux_GPlusParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=10+10)\r\nGorillaMux_GPlus2Params 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=10+10)\r\nGorillaMux_GPlusAll 128 ± 0% 96 ± 0% -25.00% (p=0.000 n=10+10)\r\nGorillaMux_ParseStatic 9.00 ± 0% 4.00 ± 0% -55.56% (p=0.000 n=10+10)\r\nGorillaMux_ParseParam 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=10+10)\r\nGorillaMux_Parse2Params 10.0 ± 0% 8.0 ± 0% -20.00% (p=0.000 n=10+10)\r\nGorillaMux_ParseAll 250 ± 0% 168 ± 0% -32.80% (p=0.000 n=10+10)\r\nGorillaMux_StaticAll 1.41k ± 0% 0.63k ± 0% -55.56% (p=0.000 n=10+10)\r\n```\r\n\r\n---\r\n\r\n
\r\n\r\n\r\n---\r\n\r\n
\r\n\r\n---\r\n\r\n
\r\n\r\nIf you read this far, please consider running benchmarks for your own\r\nuse cases\r\n of `mux` and report back any changes. Thanks!\r\n\r\n
\r\n go.mod override \r\n\r\nYou can use the following override in your `go.mod` file:\r\n```\r\nreplace github.com/gorilla/mux v1.8.1 => github.com/das7pad/mux v1.8.1-0.20220803193445-4e593050ec93\r\n```\r\nOptionally, you can enable the flag for not storing the `Route` in the\r\nrequest context:\r\n```\r\nm := mux.NewRouter()\r\nm.OmitRouteFromContext(true)\r\n```\r\n
\r\n\r\n---------\r\n\r\nSigned-off-by: Jakob Ackermann \r\nCo-authored-by: Alex Vulaj ","shortMessageHtmlLink":"perf: cut allocations (#691)"}},{"before":"b4617d0b9670ad14039b2739167fd35a60f557c5","after":"f79c3af9b03521687ad5be6a9d0cf7e9b8207d7d","ref":"refs/heads/main","pushedAt":"2023-11-13T04:31:50.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"AlexVulaj","name":"Alex Vulaj","path":"/AlexVulaj","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15162960?s=80&v=4"},"commit":{"message":"Use \"redirect\" rather than \"re-direct\" in docs (#735)\n\nThis brings these docs in line with the rest of the repository.\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [ ] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [x] Documentation Update\r\n- [ ] Go Version Update\r\n- [ ] Dependency Update\r\n\r\n## Description\r\n\r\nRemove use of hyphen in \"redirect\" in the documentation.\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [x] No, and this is why: No regression test required \r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [ ] `make verify` is passing\r\n- [x] `make test` is passing\r\n\r\n`make verify` is not passing for me locally, but the failures are in\r\nunrelated\r\nfiles. It may be because I don't see a .golangci.yml in the repo. I\r\nassume it's\r\nusing my linting config instead.","shortMessageHtmlLink":"Use \"redirect\" rather than \"re-direct\" in docs (#735)"}},{"before":null,"after":"ac856fa44dac3d5bdac2160d53f6bbec042fa3a3","ref":"refs/heads/coreydaley-patch-2","pushedAt":"2023-11-05T21:57:10.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Update LICENSE\n\nSigned-off-by: Corey Daley ","shortMessageHtmlLink":"Update LICENSE"}},{"before":null,"after":"b4617d0b9670ad14039b2739167fd35a60f557c5","ref":"refs/heads/release-1.8","pushedAt":"2023-11-05T02:14:18.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"update GitHub workflows (#734)\n\n\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [x] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [ ] Documentation Update\r\n- [ ] Go Version Update\r\n- [ ] Dependency Update\r\n\r\n## Description\r\n\r\n## Related Tickets & Documents\r\n\r\n\r\n\r\n- Related Issue #\r\n- Closes #\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [ ] No, and this is why: _please replace this line with details on why\r\ntests\r\n have not been included_\r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [x] `make verify` is passing\r\n- [x] `make test` is passing","shortMessageHtmlLink":"update GitHub workflows (#734)"}},{"before":"b4617d0b9670ad14039b2739167fd35a60f557c5","after":null,"ref":"refs/heads/release-2.0","pushedAt":"2023-11-05T01:48:31.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"}},{"before":"b4617d0b9670ad14039b2739167fd35a60f557c5","after":null,"ref":"refs/tags/v2.0","pushedAt":"2023-11-05T01:46:48.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"}},{"before":null,"after":"b4617d0b9670ad14039b2739167fd35a60f557c5","ref":"refs/heads/release-2.0","pushedAt":"2023-11-03T14:12:32.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"apoorvajagtap","name":"Apoorva Jagtap","path":"/apoorvajagtap","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35304110?s=80&v=4"},"commit":{"message":"update GitHub workflows (#734)\n\n\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [x] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [ ] Documentation Update\r\n- [ ] Go Version Update\r\n- [ ] Dependency Update\r\n\r\n## Description\r\n\r\n## Related Tickets & Documents\r\n\r\n\r\n\r\n- Related Issue #\r\n- Closes #\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [ ] No, and this is why: _please replace this line with details on why\r\ntests\r\n have not been included_\r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [x] `make verify` is passing\r\n- [x] `make test` is passing","shortMessageHtmlLink":"update GitHub workflows (#734)"}},{"before":"dbb142bfec18aa1ba2f1bd06b7287203501f1d36","after":null,"ref":"refs/heads/2023-10-17-update-github-workflows","pushedAt":"2023-10-18T11:23:01.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"apoorvajagtap","name":"Apoorva Jagtap","path":"/apoorvajagtap","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35304110?s=80&v=4"}},{"before":"3401478badc7aa55470bc806ee8cd185a16f9298","after":"b4617d0b9670ad14039b2739167fd35a60f557c5","ref":"refs/heads/main","pushedAt":"2023-10-18T11:23:00.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"apoorvajagtap","name":"Apoorva Jagtap","path":"/apoorvajagtap","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35304110?s=80&v=4"},"commit":{"message":"update GitHub workflows (#734)\n\n\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [x] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [ ] Documentation Update\r\n- [ ] Go Version Update\r\n- [ ] Dependency Update\r\n\r\n## Description\r\n\r\n## Related Tickets & Documents\r\n\r\n\r\n\r\n- Related Issue #\r\n- Closes #\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [ ] No, and this is why: _please replace this line with details on why\r\ntests\r\n have not been included_\r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [x] `make verify` is passing\r\n- [x] `make test` is passing","shortMessageHtmlLink":"update GitHub workflows (#734)"}},{"before":null,"after":"dbb142bfec18aa1ba2f1bd06b7287203501f1d36","ref":"refs/heads/2023-10-17-update-github-workflows","pushedAt":"2023-10-18T01:33:41.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"updating github action workflows","shortMessageHtmlLink":"updating github action workflows"}},{"before":"4a671cbc5162efa2ecb1b353e6a704a62737d66c","after":"3401478badc7aa55470bc806ee8cd185a16f9298","ref":"refs/heads/main","pushedAt":"2023-09-21T03:06:09.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"AlexVulaj","name":"Alex Vulaj","path":"/AlexVulaj","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15162960?s=80&v=4"},"commit":{"message":"fix SPA handler in README.md (#733)\n\n\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [ ] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [X] Documentation Update\r\n- [ ] Go Version Update\r\n- [ ] Dependency Update\r\n\r\n## Description\r\n\r\nChanged the SPA handler example in README.md in two areas. First, made\r\nsure to actually include the requested path in the call to\r\n`filepath.Join`. Secondly, if the requested path hits a directory, I\r\nthink it would be beneficial to also serve the `indexPath` file, and not\r\nlist the directory contents. I also edited the comments in the\r\n`README.md` file accordingly.\r\n\r\n## Related Tickets & Documents\r\n\r\n\r\n\r\n- Related Issue #\r\n- Closes #\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [X] No, and this is why: I only changed the `README.md`, if any tests\r\nare necessary please let me know\r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [ ] `make verify` is passing\r\n- [ ] `make test` is passing","shortMessageHtmlLink":"fix SPA handler in README.md (#733)"}},{"before":"85123bf20e069b156415b871dea10517f6a8938a","after":"4a671cbc5162efa2ecb1b353e6a704a62737d66c","ref":"refs/heads/main","pushedAt":"2023-08-24T19:57:52.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Add GetVarNames() (#676)\n\n**Summary of Changes**\r\n\r\n1. Added `r.GetVarNames()` function to list all vars a route might need\r\nin order to call `r.URL()`\r\n\r\n---------\r\n\r\nCo-authored-by: Anonymous \r\nCo-authored-by: Corey Daley ","shortMessageHtmlLink":"Add GetVarNames() (#676)"}},{"before":null,"after":"d033abe4a66f2728c35886278148b0e38e7dbe4f","ref":"refs/heads/coreydaley-patch-1","pushedAt":"2023-08-23T01:41:23.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Create .golangci.yaml\n\nSigned-off-by: Corey Daley ","shortMessageHtmlLink":"Create .golangci.yaml"}},{"before":"79f2f457ca5017e08de9f86ada03939a82dbf714","after":"85123bf20e069b156415b871dea10517f6a8938a","ref":"refs/heads/main","pushedAt":"2023-08-17T15:29:52.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"changed the routeVariables text content. (#708)\n\nBefore changing the context there is a blind spot, and for this reason,\r\ndecided to add a line break.\r\n\r\nCo-authored-by: Corey Daley ","shortMessageHtmlLink":"changed the routeVariables text content. (#708)"}},{"before":"395ad81d0ebffa0c5a36f3e5a2e720a7d5870d92","after":"79f2f457ca5017e08de9f86ada03939a82dbf714","ref":"refs/heads/main","pushedAt":"2023-08-17T04:48:59.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Clarify documentation examples of Route methods (#672)\n\nFixes #666 \r\n\r\n**Summary of Changes**\r\n\r\n1. Update `Route` method documentation comments where the example in the\r\ncomments showed a `Router` before. Updated method names include:\r\n * `Headers`\r\n * `HeadersRegexp`\r\n * `Host`\r\n * `Path`\r\n * `Queries`\r\n * `Subrouter`\r\n * `URL`\r\n\r\nNotes:\r\n* This includes what PR #667 did plus some changes requested by a\r\nmaintainer in the comments\r\n* I was a little torn about changing the example in `Subrouter` since\r\n`(*Router).Host()` (like several `(*Router)` methods) just calls\r\n`(*Router).NewRoute().Host()` so I understand if maintainers are\r\nambivalent about that example or want it to remain the same.\r\n\r\nSigned-off-by: Corey Daley \r\nCo-authored-by: Andrew Brown \r\nCo-authored-by: Corey Daley ","shortMessageHtmlLink":"Clarify documentation examples of Route methods (#672)"}},{"before":"24c3e7f499efd8b1429cfe789c7e6a3631357045","after":"395ad81d0ebffa0c5a36f3e5a2e720a7d5870d92","ref":"refs/heads/main","pushedAt":"2023-08-17T01:34:43.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"[BUG] Inconsistent HTTP status code on query mismatch (#712)\n\nThe logical behavior of a router should return an HTTP status code of\r\n404 when a request fails to satisfy route validation logic. Previously,\r\nMUX was returning a 405 HTTP status code in some rare scenarios, which\r\nwas not valid in its case.\r\n\r\nFor more info, See: https://github.com/gorilla/mux/issues/704\r\n\r\nFixes #704 \r\n\r\n**Summary of Changes**\r\n\r\n1. Clear the mismatch error of the previous validations on method match.\r\n2. Added related tests\r\n\r\n> PS: Make sure your PR includes/updates tests! If you need help with\r\nthis part, just ask!\r\n\r\nCo-authored-by: Corey Daley ","shortMessageHtmlLink":"[BUG] Inconsistent HTTP status code on query mismatch (#712)"}},{"before":"546dd0cc9f3ecdef8b065ac6336b4c6ed99887d4","after":"24c3e7f499efd8b1429cfe789c7e6a3631357045","ref":"refs/heads/main","pushedAt":"2023-08-16T02:08:21.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Fix `Single Page Application` example in `README.md` file (#678)\n\nFixes #588\r\n\r\n**Summary of Changes**\r\n\r\n1. Add test case to validate proposed fix (both negative and positive\r\ntest case).\r\n2. Update `README.md` file.\r\n\r\nPS: If you want to verify how I'm able to reproduce the issue and tried\r\nmy fix. Here is a link of my local PR where I have configured `Github\r\nAction` to execute same test cases on all the platforms i.e. `ubuntu`,\r\n`macos` and `windows`.\r\n\r\nPR link: https://github.com/amustaque97/mux/pull/1\r\n\r\n> PS: Make sure your PR includes/updates tests! If you need help with\r\nthis part, just ask!\r\n\r\n---------\r\n\r\nCo-authored-by: Corey Daley ","shortMessageHtmlLink":"Fix Single Page Application example in README.md file (#678)"}},{"before":"651928c42f7b60c7942e46d5f651dd1ece444246","after":"546dd0cc9f3ecdef8b065ac6336b4c6ed99887d4","ref":"refs/heads/main","pushedAt":"2023-07-31T01:44:28.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"run go fmt with Go 1.20 (#725)\n\n\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [ ] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [x] Documentation Update\r\n\r\n## Description\r\n\r\n`go fmt` now formats godoc comments. I apply it.\r\n\r\n## Related Tickets & Documents\r\n\r\n\r\n\r\n- Related Issue #\r\n- Closes #\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [x] No, and this is why: this pull request updates only comments\r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [x] `make verify` is passing\r\n- [x] `make test` is passing\r\n\r\nCo-authored-by: Corey Daley ","shortMessageHtmlLink":"run go fmt with Go 1.20 (#725)"}},{"before":"ccfeb86b7f5341a1be3b2cdf262a55913510d1d1","after":null,"ref":"refs/heads/coreydaley-patch-1","pushedAt":"2023-07-30T16:37:43.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"}},{"before":"cfc696d6d239ff68ceb71ee35c9a4e4ef3f30ed9","after":"651928c42f7b60c7942e46d5f651dd1ece444246","ref":"refs/heads/main","pushedAt":"2023-07-30T16:37:42.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Update issues.yml (#727)\n\n\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [ ] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [ ] Documentation Update\r\n\r\n## Description\r\n\r\n## Related Tickets & Documents\r\n\r\n\r\n\r\n- Related Issue #\r\n- Closes #\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [ ] No, and this is why: _please replace this line with details on why\r\ntests\r\n have not been included_\r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [ ] `make verify` is passing\r\n- [ ] `make test` is passing\r\n\r\nSigned-off-by: Corey Daley ","shortMessageHtmlLink":"Update issues.yml (#727)"}},{"before":null,"after":"ccfeb86b7f5341a1be3b2cdf262a55913510d1d1","ref":"refs/heads/coreydaley-patch-1","pushedAt":"2023-07-30T16:37:28.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Update issues.yml\n\nSigned-off-by: Corey Daley ","shortMessageHtmlLink":"Update issues.yml"}},{"before":"dc5c7c92b5b1403eb3ee7db8feb76e4fd6deea5e","after":null,"ref":"refs/heads/coreydaley-patch-1","pushedAt":"2023-07-30T16:23:58.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"}},{"before":"809d12850fc170caa4229eb2da58a4701c9837b8","after":"cfc696d6d239ff68ceb71ee35c9a4e4ef3f30ed9","ref":"refs/heads/main","pushedAt":"2023-07-30T16:23:57.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Update issues.yml (#726)\n\n\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [ ] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [ ] Documentation Update\r\n\r\n## Description\r\n\r\n## Related Tickets & Documents\r\n\r\n\r\n\r\n- Related Issue #\r\n- Closes #\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [ ] No, and this is why: _please replace this line with details on why\r\ntests\r\n have not been included_\r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [ ] `make verify` is passing\r\n- [ ] `make test` is passing\r\n\r\nSigned-off-by: Corey Daley ","shortMessageHtmlLink":"Update issues.yml (#726)"}},{"before":null,"after":"dc5c7c92b5b1403eb3ee7db8feb76e4fd6deea5e","ref":"refs/heads/coreydaley-patch-1","pushedAt":"2023-07-30T16:21:48.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Update issues.yml\n\nSigned-off-by: Corey Daley ","shortMessageHtmlLink":"Update issues.yml"}},{"before":"96c05133421e349160b742713dd7ccbbbcb3b92f","after":null,"ref":"refs/heads/coreydaley-patch-1","pushedAt":"2023-07-25T17:19:45.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"apoorvajagtap","name":"Apoorva Jagtap","path":"/apoorvajagtap","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35304110?s=80&v=4"}},{"before":"753457f3059d3db9a96f9f4c67d7f3724e97478d","after":"809d12850fc170caa4229eb2da58a4701c9837b8","ref":"refs/heads/main","pushedAt":"2023-07-25T17:19:44.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"apoorvajagtap","name":"Apoorva Jagtap","path":"/apoorvajagtap","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35304110?s=80&v=4"},"commit":{"message":"Update LICENSE (#723)\n\n\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [ ] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [ ] Documentation Update\r\n\r\n## Description\r\n\r\n## Related Tickets & Documents\r\n\r\n\r\n\r\n- Related Issue #\r\n- Closes #\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [ ] No, and this is why: _please replace this line with details on why\r\ntests\r\n have not been included_\r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [ ] `make verify` is passing\r\n- [ ] `make test` is passing\r\n\r\nSigned-off-by: Corey Daley ","shortMessageHtmlLink":"Update LICENSE (#723)"}},{"before":"7ce66b764c6cbcad6fb17420b335f3469689336d","after":"96c05133421e349160b742713dd7ccbbbcb3b92f","ref":"refs/heads/coreydaley-patch-1","pushedAt":"2023-07-25T16:44:51.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Merge branch 'main' into coreydaley-patch-1","shortMessageHtmlLink":"Merge branch 'main' into coreydaley-patch-1"}},{"before":"ff63d0e2fd6b3634b25a63c85c27a3dc80a3b8c8","after":"753457f3059d3db9a96f9f4c67d7f3724e97478d","ref":"refs/heads/main","pushedAt":"2023-07-25T16:35:16.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"coreydaley","name":"Corey Daley","path":"/coreydaley","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5060301?s=80&v=4"},"commit":{"message":"Updated the logo in README.md (#724)\n\n\r\n\r\n## What type of PR is this? (check all applicable)\r\n\r\n- [ ] Refactor\r\n- [ ] Feature\r\n- [ ] Bug Fix\r\n- [ ] Optimization\r\n- [x] Documentation Update\r\n\r\n## Description\r\n\r\n## Related Tickets & Documents\r\n\r\n\r\n\r\n- Related Issue #710\r\n- Closes #710\r\n\r\n## Added/updated tests?\r\n\r\n- [ ] Yes\r\n- [ ] No, and this is why: _please replace this line with details on why\r\ntests\r\n have not been included_\r\n- [ ] I need help with writing tests\r\n\r\n## Run verifications and test\r\n\r\n- [ ] `make verify` is passing\r\n- [ ] `make test` is passing\r\n\r\nSigned-off-by: Sham Karthik S <53367916+shamkarthik@users.noreply.github.com>","shortMessageHtmlLink":"Updated the logo in README.md (#724)"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEJQ_eJQA","startCursor":null,"endCursor":null}},"title":"Activity · gorilla/mux"}