diff --git a/.travis.yml b/.travis.yml index 9573daa6..e49d8f79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ sudo: false language: go go: - - 1.4 + - 1.6 - tip diff --git a/README.md b/README.md index b90856be..65be4681 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,15 @@ +## News 13 April 2016 +These benchmarks was from previous version of Iris (v1). To see the new benchmark results you have to [click here](https://github.com/smallnest/go-web-framework-benchmark), it's external source I didn't create these benchmarks but they are seem better and far more realistic than julien's. + Go HTTP Router Benchmark ======================== +> Note that this repository is just an updated version (24 March 2016) of the Julien's repo: [https://github.com/julienschmidt/go-http-routing-benchmark/](https://github.com/julienschmidt/go-http-routing-benchmark/) , all repository's copyrights goes to him! + This benchmark suite aims to compare the performance of HTTP request routers for [Go](https://golang.org) by implementing the routing structure of some real world APIs. Some of the APIs are slightly adapted, since they can not be implemented 1:1 in some of the routers. -Of course the tested routers can be used for any kind of HTTP request → handler function routing, not only (REST) APIs. - - -#### Tested routers & frameworks: - - * [Beego](http://beego.me/) - * [go-json-rest](https://github.com/ant0ine/go-json-rest) - * [Denco](https://github.com/naoina/denco) - * [Gocraft Web](https://github.com/gocraft/web) - * [Goji](https://github.com/zenazn/goji/) - * [Gorilla Mux](http://www.gorillatoolkit.org/pkg/mux) - * [http.ServeMux](http://golang.org/pkg/net/http/#ServeMux) - * [HttpRouter](https://github.com/julienschmidt/httprouter) - * [HttpTreeMux](https://github.com/dimfeld/httptreemux) - * [Kocha-urlrouter](https://github.com/naoina/kocha-urlrouter) - * [Martini](https://github.com/go-martini/martini) - * [Pat](https://github.com/bmizerany/pat) - * [Possum](https://github.com/mikespook/possum) - * [R2router](https://github.com/vanng822/r2router) - * [TigerTonic](https://github.com/rcrowley/go-tigertonic) - * [Traffic](https://github.com/pilu/traffic) +Of course the tested routers can be used for any kind of HTTP request > handler function routing, not only (REST) APIs. ## Motivation @@ -39,45 +24,15 @@ Beware that we are comparing apples to oranges here, we compare feature-rich fra If you care about performance, this benchmark can maybe help you find the right router, which scales with your application. -Personally, I prefer slim and optimized software, which is why I implemented [HttpRouter](https://github.com/julienschmidt/httprouter), which is also tested here. In fact, this benchmark suite started as part of the packages tests, but was then extended to a generic benchmark suite. -So keep in mind, that I am not completely unbiased :relieved: - ## Results Benchmark System: - * Intel Core i5-2500K (4x 3,30GHz + Turbo Boost), CPU-governor: performance + * Intel Core i7-4710HQ CPU @ 2.50Ghz * 2x 4 GiB DDR3-1333 RAM, dual-channel - * go version go1.3rc1 linux/amd64 - * Ubuntu 14.04 amd64 (Linux Kernel 3.13.0-29), fresh installation - + * go version go1.6 windows/amd64 + * Windows 7 Ultimate -### Memory Consumption - -Besides the micro-benchmarks, there are 3 sets of benchmarks where we play around with clones of some real-world APIs, and one benchmark with static routes only, to allow a comparison with [http.ServeMux](http://golang.org/pkg/net/http/#ServeMux). -The following table shows the memory required only for loading the routing structure for the respective API. -The best 3 values for each test are bold. I'm pretty sure you can detect a pattern :wink: - -| Router | Static | GitHub | Google+ | Parse | -|:-------------|----------:|-----------:|----------:|----------:| -| HttpServeMux |__18064 B__| - | - | - | -| Beego | 79472 B | 497248 B | 26480 B | 38768 B | -| Denco | 44752 B | 107632 B | 54896 B | 36368 B | -| Gocraft Web | 57976 B | 95736 B | 8024 B | 13120 B | -| Goji | 32400 B | __58424 B__| __3392 B__| __6704 B__| -| Go-Json-Rest | 152608 B | 148352 B | 11696 B | 13712 B | -| Gorilla Mux | 685152 B | 1557216 B | 80240 B | 125480 B | -| HttpRouter |__26232 B__| __44344 B__| __3144 B__| __5792 B__| -| HttpTreeMux | 75624 B | 81408 B | 7712 B | 7616 B | -| Kocha | 130336 B | 811744 B | 139968 B | 191632 B | -| Martini | 312592 B | 579472 B | 27520 B | 50608 B | -| Pat |__21272 B__| __18968 B__| __1448 B__| __2360 B__| -| TigerTonic | 85264 B | 99392 B | 10576 B | 11008 B | -| Traffic | 649568 B | 1124704 B | 57984 B | 98168 B | - -The first place goes to [Pat](https://github.com/bmizerany/pat), followed by [HttpRouter](https://github.com/julienschmidt/httprouter) and [Goji](https://github.com/zenazn/goji/). Now, before everyone starts reading the documentation of Pat, `[SPOILER]` this low memory consumption comes at the price of relatively bad routing performance. The routing structure of Pat is simple - probably too simple. `[/SPOILER]`. - -Moreover main memory is cheap and usually not a scarce resource. As long as the router doesn't require Megabytes of memory, it should be no deal breaker. But it gives us a first hint how efficient or wasteful a router works. ### Static Routes @@ -90,24 +45,40 @@ In the `StaticAll` benchmark each of 157 URLs is called once per repetition (op, The logs below show, that http.ServeMux has only medium performance, compared to more feature-rich routers. The fastest router only needs 1.8% of the time http.ServeMux needs. -[HttpRouter](https://github.com/julienschmidt/httprouter) was the first router (I know of) that managed to serve all the static URLs without a single heap allocation. Since [the first run of this benchmark](https://github.com/julienschmidt/go-http-routing-benchmark/blob/0eb78904be13aee7a1e9f8943386f7c26b9d9d79/README.md) more routers followed this trend and were optimized in the same way. ``` -BenchmarkHttpServeMux_StaticAll 5000 706222 ns/op 96 B/op 6 allocs/op - -BenchmarkBeego_StaticAll 2000 1408954 ns/op 482433 B/op 14088 allocs/op -BenchmarkDenco_StaticAll 200000 12679 ns/op 0 B/op 0 allocs/op -BenchmarkGocraftWeb_StaticAll 10000 154142 ns/op 51468 B/op 947 allocs/op -BenchmarkGoji_StaticAll 20000 80518 ns/op 0 B/op 0 allocs/op -BenchmarkGoJsonRest_StaticAll 2000 978164 ns/op 180973 B/op 3945 allocs/op -BenchmarkGorillaMux_StaticAll 1000 1763690 ns/op 71804 B/op 956 allocs/op -BenchmarkHttpRouter_StaticAll 100000 15010 ns/op 0 B/op 0 allocs/op -BenchmarkHttpTreeMux_StaticAll 100000 15123 ns/op 0 B/op 0 allocs/op -BenchmarkKocha_StaticAll 100000 23093 ns/op 0 B/op 0 allocs/op -BenchmarkMartini_StaticAll 500 3444278 ns/op 156015 B/op 2351 allocs/op -BenchmarkPat_StaticAll 1000 1640745 ns/op 549187 B/op 11186 allocs/op -BenchmarkTigerTonic_StaticAll 50000 58264 ns/op 7714 B/op 157 allocs/op -BenchmarkTraffic_StaticAll 500 7230129 ns/op 3763731 B/op 27453 allocs/op +BenchmarkAce_StaticAll 30000 45069 ns/op 0 B/op 0 allocs/op +BenchmarkHttpServeMux_StaticAll 2000 749542 ns/op 96 B/op 8 allocs/op +BenchmarkBeego_StaticAll 10000 229913 ns/op 15744 B/op 628 allocs/op +BenchmarkBear_StaticAll 10000 102805 ns/op 20336 B/op 461 allocs/op +BenchmarkBone_StaticAll 20000 74654 ns/op 0 B/op 0 allocs/op +BenchmarkDenco_StaticAll 100000 12750 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_StaticAll 50000 29521 ns/op 0 B/op 0 allocs/op +BenchmarkGin_StaticAll 50000 27861 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_StaticAll 10000 165709 ns/op 46440 B/op 785 allocs/op +BenchmarkGoji_StaticAll 20000 60603 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_StaticAll 10000 155908 ns/op 25120 B/op 628 allocs/op +BenchmarkGoJsonRest_StaticAll 10000 246314 ns/op 51653 B/op 1727 allocs/op +BenchmarkGoRestful_StaticAll 300 5300303 ns/op 392312 B/op 4694 allocs/op +BenchmarkGorillaMux_StaticAll 1000 2013115 ns/op 70432 B/op 1107 allocs/op +BenchmarkHttpRouter_StaticAll 100000 16890 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_StaticAll 100000 16830 ns/op 0 B/op 0 allocs/op +BenchmarkIris_StaticAll 100000 15580 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_StaticAll 100000 23181 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_StaticAll 50000 27121 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_StaticAll 5000 374421 ns/op 118065 B/op 1256 allocs/op +BenchmarkMartini_StaticAll 500 2550146 ns/op 132818 B/op 2178 allocs/op +BenchmarkPat_StaticAll 1000 1524087 ns/op 533904 B/op 11123 allocs/op +BenchmarkPossum_StaticAll 10000 183510 ns/op 65312 B/op 471 allocs/op +BenchmarkR2router_StaticAll 10000 114406 ns/op 22608 B/op 628 allocs/op +BenchmarkRevel_StaticAll 3000 698039 ns/op 198240 B/op 3611 allocs/op +BenchmarkRivet_StaticAll 50000 32081 ns/op 0 B/op 0 allocs/op +BenchmarkTango_StaticAll 10000 268015 ns/op 40481 B/op 1413 allocs/op +BenchmarkTigerTonic_StaticAll 20000 63353 ns/op 7504 B/op 157 allocs/op +BenchmarkTraffic_StaticAll 1000 1976113 ns/op 729736 B/op 14287 allocs/op +BenchmarkVulcan_StaticAll 10000 198611 ns/op 15386 B/op 471 allocs/op + + ``` ### Micro Benchmarks @@ -116,67 +87,103 @@ The following benchmarks measure the cost of some very basic operations. In the first benchmark, only a single route, containing a parameter, is loaded into the routers. Then a request for a URL matching this pattern is made and the router has to call the respective registered handler function. End. ``` -BenchmarkBeego_Param 500000 5495 ns/op 1165 B/op 14 allocs/op -BenchmarkDenco_Param 5000000 312 ns/op 50 B/op 2 allocs/op -BenchmarkGocraftWeb_Param 1000000 1440 ns/op 684 B/op 9 allocs/op -BenchmarkGoji_Param 5000000 748 ns/op 340 B/op 2 allocs/op -BenchmarkGoJsonRest_Param 500000 6980 ns/op 1787 B/op 29 allocs/op -BenchmarkGorillaMux_Param 1000000 2665 ns/op 780 B/op 7 allocs/op -BenchmarkHttpRouter_Param 20000000 139 ns/op 33 B/op 1 allocs/op -BenchmarkHttpTreeMux_Param 5000000 558 ns/op 340 B/op 2 allocs/op -BenchmarkKocha_Param 5000000 377 ns/op 58 B/op 2 allocs/op -BenchmarkMartini_Param 500000 6265 ns/op 1251 B/op 12 allocs/op -BenchmarkPat_Param 1000000 1620 ns/op 670 B/op 11 allocs/op -BenchmarkTigerTonic_Param 1000000 2766 ns/op 1015 B/op 18 allocs/op -BenchmarkTraffic_Param 500000 4440 ns/op 2013 B/op 22 allocs/op +BenchmarkAce_Param 5000000 347 ns/op 32 B/op 1 allocs/op +BenchmarkBear_Param 1000000 1313 ns/op 456 B/op 5 allocs/op +BenchmarkBeego_Param 1000000 1173 ns/op 64 B/op 4 allocs/op +BenchmarkBone_Param 1000000 1255 ns/op 384 B/op 3 allocs/op +BenchmarkDenco_Param 10000000 230 ns/op 32 B/op 1 allocs/op +BenchmarkEcho_Param 20000000 91.8 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Param 20000000 87.0 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Param 1000000 1961 ns/op 648 B/op 8 allocs/op +BenchmarkGoji_Param 2000000 979 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_Param 2000000 837 ns/op 176 B/op 5 allocs/op +BenchmarkGoJsonRest_Param 1000000 2129 ns/op 649 B/op 13 allocs/op +BenchmarkGoRestful_Param 200000 8860 ns/op 2696 B/op 27 allocs/op +BenchmarkGorillaMux_Param 1000000 3152 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_Param 10000000 156 ns/op 32 B/op 1 allocs/op +BenchmarkHttpTreeMux_Param 2000000 901 ns/op 352 B/op 3 allocs/op +BenchmarkIris_Param 30000000 49.7 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_Param 3000000 411 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_Param 20000000 92.3 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Param 1000000 3269 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_Param 500000 5216 ns/op 1104 B/op 11 allocs/op +BenchmarkPat_Param 1000000 2203 ns/op 648 B/op 12 allocs/op +BenchmarkPossum_Param 1000000 1988 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Param 1000000 1235 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_Param 300000 6060 ns/op 1632 B/op 26 allocs/op +BenchmarkRivet_Param 5000000 263 ns/op 48 B/op 1 allocs/op +BenchmarkTango_Param 1000000 1436 ns/op 256 B/op 9 allocs/op +BenchmarkTigerTonic_Param 1000000 3699 ns/op 976 B/op 16 allocs/op +BenchmarkTraffic_Param 300000 5837 ns/op 1960 B/op 21 allocs/op +BenchmarkVulcan_Param 2000000 859 ns/op 98 B/op 3 allocs/op ``` -Same as before, but now with multiple parameters, all in the same single route. The intention is to see how the routers scale with the number of parameters. The values of the parameters must be passed to the handler function somehow, which requires allocations. Let's see how clever the routers solve this task with a route containing 5 and 20 parameters: +Same as before, but now with multiple parameters, all in the same single route. The intention is to see how the routers scale with the number of parameters. The values of the parameters must be passed to the handler function somehow, which requires allocations. Let's see how clever the routers solve this task with a route containing 5 arameters: ``` -BenchmarkBeego_Param5 100000 18473 ns/op 1291 B/op 14 allocs/op -BenchmarkDenco_Param5 2000000 982 ns/op 405 B/op 5 allocs/op -BenchmarkGocraftWeb_Param5 1000000 2218 ns/op 957 B/op 12 allocs/op -BenchmarkGoji_Param5 1000000 1093 ns/op 340 B/op 2 allocs/op -BenchmarkGoJsonRest_Param5 200000 10462 ns/op 3264 B/op 40 allocs/op -BenchmarkGorillaMux_Param5 500000 4680 ns/op 906 B/op 7 allocs/op -BenchmarkHttpRouter_Param5 5000000 319 ns/op 162 B/op 1 allocs/op -BenchmarkHttpTreeMux_Param5 2000000 898 ns/op 340 B/op 2 allocs/op -BenchmarkKocha_Param5 1000000 1326 ns/op 448 B/op 7 allocs/op -BenchmarkMartini_Param5 200000 13027 ns/op 1376 B/op 12 allocs/op -BenchmarkPat_Param5 500000 3416 ns/op 1435 B/op 18 allocs/op -BenchmarkTigerTonic_Param5 200000 9247 ns/op 2568 B/op 41 allocs/op -BenchmarkTraffic_Param5 500000 7206 ns/op 2312 B/op 26 allocs/op - -BenchmarkBeego_Param20 10000 106746 ns/op 3681 B/op 17 allocs/op -BenchmarkDenco_Param20 1000000 2882 ns/op 1666 B/op 7 allocs/op -BenchmarkGocraftWeb_Param20 500000 7156 ns/op 3857 B/op 16 allocs/op -BenchmarkGoji_Param20 1000000 3197 ns/op 1260 B/op 2 allocs/op -BenchmarkGoJsonRest_Param20 100000 25809 ns/op 10605 B/op 75 allocs/op -BenchmarkGorillaMux_Param20 200000 9885 ns/op 3295 B/op 9 allocs/op -BenchmarkHttpRouter_Param20 2000000 954 ns/op 646 B/op 1 allocs/op -BenchmarkHttpTreeMux_Param20 500000 5016 ns/op 2216 B/op 4 allocs/op -BenchmarkKocha_Param20 500000 4268 ns/op 1836 B/op 17 allocs/op -BenchmarkMartini_Param20 50000 55039 ns/op 3765 B/op 14 allocs/op -BenchmarkPat_Param20 500000 3412 ns/op 1435 B/op 18 allocs/op -BenchmarkTigerTonic_Param20 50000 36825 ns/op 10710 B/op 131 allocs/op -BenchmarkTraffic_Param20 100000 22605 ns/op 8077 B/op 49 allocs/op +BenchmarkAce_Param5 2000000 661 ns/op 160 B/op 1 allocs/op +BenchmarkBear_Param5 1000000 1770 ns/op 501 B/op 5 allocs/op +BenchmarkBeego_Param5 1000000 1668 ns/op 128 B/op 4 allocs/op +BenchmarkBone_Param5 1000000 1687 ns/op 432 B/op 3 allocs/op +BenchmarkDenco_Param5 2000000 636 ns/op 160 B/op 1 allocs/op +BenchmarkEcho_Param5 10000000 163 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Param5 10000000 147 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Param5 1000000 3091 ns/op 920 B/op 11 allocs/op +BenchmarkGoji_Param5 1000000 1294 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_Param5 1000000 1175 ns/op 240 B/op 5 allocs/op +BenchmarkGoJsonRest_Param5 1000000 3989 ns/op 1097 B/op 16 allocs/op +BenchmarkGoRestful_Param5 200000 10665 ns/op 2872 B/op 27 allocs/op +BenchmarkGorillaMux_Param5 500000 4872 ns/op 816 B/op 8 allocs/op +BenchmarkHttpRouter_Param5 3000000 499 ns/op 160 B/op 1 allocs/op +BenchmarkHttpTreeMux_Param5 1000000 2133 ns/op 576 B/op 6 allocs/op +BenchmarkIris_Param5 30000000 49.3 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_Param5 1000000 1917 ns/op 440 B/op 10 allocs/op +BenchmarkLARS_Param5 10000000 155 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Param5 1000000 3742 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_Param5 300000 7177 ns/op 1232 B/op 11 allocs/op +BenchmarkPat_Param5 300000 5273 ns/op 964 B/op 32 allocs/op +BenchmarkPossum_Param5 1000000 2037 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Param5 1000000 1569 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_Param5 200000 7785 ns/op 1984 B/op 33 allocs/op +BenchmarkRivet_Param5 2000000 867 ns/op 240 B/op 1 allocs/op +BenchmarkTango_Param5 1000000 3771 ns/op 944 B/op 17 allocs/op +BenchmarkTigerTonic_Param5 200000 11565 ns/op 2471 B/op 38 allocs/op +BenchmarkTraffic_Param5 200000 8700 ns/op 2248 B/op 25 allocs/op +BenchmarkVulcan_Param5 1000000 1122 ns/op 98 B/op 3 allocs/op + ``` Now let's see how expensive it is to access a parameter. The handler function reads the value (by the name of the parameter, e.g. with a map lookup; depends on the router) and writes it to our [web scale storage](https://www.youtube.com/watch?v=b2F-DItXtZs) (`/dev/null`). ``` -BenchmarkBeego_ParamWrite 500000 6604 ns/op 1602 B/op 18 allocs/op -BenchmarkDenco_ParamWrite 5000000 377 ns/op 50 B/op 2 allocs/op -BenchmarkGocraftWeb_ParamWrite 1000000 1590 ns/op 693 B/op 9 allocs/op -BenchmarkGoji_ParamWrite 2000000 818 ns/op 340 B/op 2 allocs/op -BenchmarkGoJsonRest_ParamWrite 200000 8388 ns/op 2265 B/op 33 allocs/op -BenchmarkGorillaMux_ParamWrite 1000000 2913 ns/op 780 B/op 7 allocs/op -BenchmarkHttpRouter_ParamWrite 10000000 193 ns/op 33 B/op 1 allocs/op -BenchmarkHttpTreeMux_ParamWrite 5000000 649 ns/op 340 B/op 2 allocs/op -BenchmarkKocha_ParamWrite 5000000 435 ns/op 58 B/op 2 allocs/op -BenchmarkMartini_ParamWrite 500000 7538 ns/op 1359 B/op 15 allocs/op -BenchmarkPat_ParamWrite 1000000 2940 ns/op 1109 B/op 15 allocs/op -BenchmarkTigerTonic_ParamWrite 500000 4639 ns/op 1471 B/op 23 allocs/op -BenchmarkTraffic_ParamWrite 500000 5855 ns/op 2435 B/op 25 allocs/op +BenchmarkAce_ParamWrite 3000000 447 ns/op 40 B/op 2 allocs/op +BenchmarkBear_ParamWrite 1000000 1370 ns/op 456 B/op 5 allocs/op +BenchmarkBeego_ParamWrite 1000000 1298 ns/op 72 B/op 5 allocs/op +BenchmarkBone_ParamWrite 1000000 1347 ns/op 384 B/op 3 allocs/op +BenchmarkDenco_ParamWrite 5000000 289 ns/op 32 B/op 1 allocs/op +BenchmarkEcho_ParamWrite 10000000 204 ns/op 8 B/op 1 allocs/op +BenchmarkGin_ParamWrite 10000000 181 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParamWrite 1000000 2096 ns/op 656 B/op 9 allocs/op +BenchmarkGoji_ParamWrite 1000000 1051 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_ParamWrite 1000000 1118 ns/op 208 B/op 7 allocs/op +BenchmarkGoJsonRest_ParamWrite 1000000 3461 ns/op 1128 B/op 18 allocs/op +BenchmarkGoRestful_ParamWrite 200000 9085 ns/op 2704 B/op 28 allocs/op +BenchmarkGorillaMux_ParamWrite 1000000 3290 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_ParamWrite 10000000 211 ns/op 32 B/op 1 allocs/op +BenchmarkHttpTreeMux_ParamWrite 2000000 967 ns/op 352 B/op 3 allocs/op +BenchmarkIris_ParamWrite 10000000 145 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParamWrite 3000000 476 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_ParamWrite 10000000 174 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParamWrite 1000000 3847 ns/op 1144 B/op 13 allocs/op +BenchmarkMartini_ParamWrite 300000 5983 ns/op 1208 B/op 15 allocs/op +BenchmarkPat_ParamWrite 1000000 3637 ns/op 1072 B/op 17 allocs/op +BenchmarkPossum_ParamWrite 1000000 2011 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_ParamWrite 1000000 1335 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_ParamWrite 200000 7270 ns/op 2096 B/op 31 allocs/op +BenchmarkRivet_ParamWrite 3000000 540 ns/op 144 B/op 3 allocs/op +BenchmarkTango_ParamWrite 2000000 775 ns/op 136 B/op 4 allocs/op +BenchmarkTigerTonic_ParamWrite 300000 5723 ns/op 1408 B/op 22 allocs/op +BenchmarkTraffic_ParamWrite 300000 7230 ns/op 2384 B/op 25 allocs/op +BenchmarkVulcan_ParamWrite 2000000 854 ns/op 98 B/op 3 allocs/op + ``` ### [Parse.com](https://parse.com/docs/rest#summary) @@ -188,61 +195,128 @@ The tasks are 1.) routing a static URL (no parameters), 2.) routing a URL contai Worth noting is, that the requested route might be a good case for some routing algorithms, while it is a bad case for another algorithm. The values might vary slightly depending on the selected route. ``` -BenchmarkBeego_ParseStatic 500000 3461 ns/op 1247 B/op 15 allocs/op -BenchmarkDenco_ParseStatic 50000000 42.6 ns/op 0 B/op 0 allocs/op -BenchmarkGocraftWeb_ParseStatic 2000000 889 ns/op 328 B/op 6 allocs/op -BenchmarkGoji_ParseStatic 5000000 341 ns/op 0 B/op 0 allocs/op -BenchmarkGoJsonRest_ParseStatic 500000 5860 ns/op 1136 B/op 25 allocs/op -BenchmarkGorillaMux_ParseStatic 1000000 2760 ns/op 456 B/op 6 allocs/op -BenchmarkHttpRouter_ParseStatic 50000000 36.7 ns/op 0 B/op 0 allocs/op -BenchmarkHttpTreeMux_ParseStatic 50000000 62.6 ns/op 0 B/op 0 allocs/op -BenchmarkKocha_ParseStatic 50000000 72.2 ns/op 0 B/op 0 allocs/op -BenchmarkMartini_ParseStatic 500000 5528 ns/op 927 B/op 11 allocs/op -BenchmarkPat_ParseStatic 2000000 809 ns/op 246 B/op 5 allocs/op -BenchmarkTigerTonic_ParseStatic 10000000 264 ns/op 49 B/op 1 allocs/op -BenchmarkTraffic_ParseStatic 500000 5008 ns/op 2377 B/op 24 allocs/op - -BenchmarkBeego_ParseParam 500000 7983 ns/op 1775 B/op 28 allocs/op -BenchmarkDenco_ParseParam 5000000 347 ns/op 50 B/op 2 allocs/op -BenchmarkGocraftWeb_ParseParam 1000000 1535 ns/op 700 B/op 9 allocs/op -BenchmarkGoji_ParseParam 2000000 983 ns/op 340 B/op 2 allocs/op -BenchmarkGoJsonRest_ParseParam 500000 7208 ns/op 1789 B/op 29 allocs/op -BenchmarkGorillaMux_ParseParam 1000000 3186 ns/op 780 B/op 7 allocs/op -BenchmarkHttpRouter_ParseParam 10000000 178 ns/op 65 B/op 1 allocs/op -BenchmarkHttpTreeMux_ParseParam 5000000 617 ns/op 340 B/op 2 allocs/op -BenchmarkKocha_ParseParam 5000000 413 ns/op 58 B/op 2 allocs/op -BenchmarkMartini_ParseParam 500000 7524 ns/op 1251 B/op 12 allocs/op -BenchmarkPat_ParseParam 1000000 2707 ns/op 1160 B/op 18 allocs/op -BenchmarkTigerTonic_ParseParam 1000000 3010 ns/op 1048 B/op 19 allocs/op -BenchmarkTraffic_ParseParam 500000 5228 ns/op 2314 B/op 24 allocs/op - -BenchmarkBeego_Parse2Params 200000 9217 ns/op 1935 B/op 28 allocs/op -BenchmarkDenco_Parse2Params 5000000 542 ns/op 115 B/op 3 allocs/op -BenchmarkGocraftWeb_Parse2Params 1000000 1756 ns/op 750 B/op 10 allocs/op -BenchmarkGoji_Parse2Params 2000000 954 ns/op 340 B/op 2 allocs/op -BenchmarkGoJsonRest_Parse2Params 500000 8131 ns/op 2145 B/op 32 allocs/op -BenchmarkGorillaMux_Parse2Params 500000 3623 ns/op 812 B/op 7 allocs/op -BenchmarkHttpRouter_Parse2Params 10000000 202 ns/op 65 B/op 1 allocs/op -BenchmarkHttpTreeMux_Parse2Params 5000000 708 ns/op 340 B/op 2 allocs/op -BenchmarkKocha_Parse2Params 5000000 666 ns/op 132 B/op 4 allocs/op -BenchmarkMartini_Parse2Params 200000 7723 ns/op 1283 B/op 12 allocs/op -BenchmarkPat_Parse2Params 1000000 2687 ns/op 887 B/op 19 allocs/op -BenchmarkTigerTonic_Parse2Params 500000 4720 ns/op 1473 B/op 28 allocs/op -BenchmarkTraffic_Parse2Params 500000 5467 ns/op 2120 B/op 24 allocs/op - -BenchmarkBeego_ParseAll 10000 197920 ns/op 38877 B/op 616 allocs/op -BenchmarkDenco_ParseAll 500000 7692 ns/op 1000 B/op 35 allocs/op -BenchmarkGocraftWeb_ParseAll 50000 36226 ns/op 14639 B/op 208 allocs/op -BenchmarkGoji_ParseAll 100000 19721 ns/op 5448 B/op 32 allocs/op -BenchmarkGoJsonRest_ParseAll 10000 180128 ns/op 41202 B/op 727 allocs/op -BenchmarkGorillaMux_ParseAll 10000 120929 ns/op 17138 B/op 173 allocs/op -BenchmarkHttpRouter_ParseAll 500000 3592 ns/op 660 B/op 16 allocs/op -BenchmarkHttpTreeMux_ParseAll 200000 11650 ns/op 5452 B/op 32 allocs/op -BenchmarkKocha_ParseAll 200000 9371 ns/op 1163 B/op 44 allocs/op -BenchmarkMartini_ParseAll 10000 200307 ns/op 29375 B/op 305 allocs/op -BenchmarkPat_ParseAll 50000 53113 ns/op 18017 B/op 363 allocs/op -BenchmarkTigerTonic_ParseAll 50000 67208 ns/op 20547 B/op 419 allocs/op -BenchmarkTraffic_ParseAll 10000 164938 ns/op 70161 B/op 743 allocs/op +BenchmarkAce_ParseStatic 10000000 199 ns/op 0 B/op 0 allocs/op +BenchmarkBear_ParseStatic 3000000 497 ns/op 120 B/op 3 allocs/op +BenchmarkBeego_ParseStatic 1000000 1010 ns/op 32 B/op 4 allocs/op +BenchmarkBone_ParseStatic 2000000 685 ns/op 144 B/op 3 allocs/op +BenchmarkDenco_ParseStatic 30000000 47.2 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_ParseStatic 20000000 92.5 ns/op 0 B/op 0 allocs/op +BenchmarkGin_ParseStatic 20000000 91.5 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParseStatic 2000000 944 ns/op 296 B/op 5 allocs/op +BenchmarkGoji_ParseStatic 5000000 251 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_ParseStatic 2000000 638 ns/op 160 B/op 4 allocs/op +BenchmarkGoJsonRest_ParseStatic 1000000 1218 ns/op 329 B/op 11 allocs/op +BenchmarkGoRestful_ParseStatic 200000 12490 ns/op 3656 B/op 30 allocs/op +BenchmarkGorillaMux_ParseStatic 500000 2952 ns/op 448 B/op 7 allocs/op +BenchmarkHttpRouter_ParseStatic 50000000 36.8 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_ParseStatic 20000000 70.8 ns/op 0 B/op 0 allocs/op +BenchmarkIris_ParseStatic 30000000 49.2 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParseStatic 20000000 60.0 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_ParseStatic 20000000 92.9 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParseStatic 1000000 2265 ns/op 752 B/op 8 allocs/op +BenchmarkMartini_ParseStatic 500000 4386 ns/op 784 B/op 10 allocs/op +BenchmarkPat_ParseStatic 2000000 820 ns/op 240 B/op 5 allocs/op +BenchmarkPossum_ParseStatic 1000000 1178 ns/op 416 B/op 3 allocs/op +BenchmarkR2router_ParseStatic 2000000 608 ns/op 144 B/op 4 allocs/op +BenchmarkRevel_ParseStatic 500000 4662 ns/op 1248 B/op 23 allocs/op +BenchmarkRivet_ParseStatic 20000000 85.7 ns/op 0 B/op 0 allocs/op +BenchmarkTango_ParseStatic 1000000 1284 ns/op 256 B/op 9 allocs/op +BenchmarkTigerTonic_ParseStatic 5000000 306 ns/op 48 B/op 1 allocs/op +BenchmarkTraffic_ParseStatic 500000 4098 ns/op 1816 B/op 20 allocs/op +BenchmarkVulcan_ParseStatic 2000000 832 ns/op 98 B/op 3 allocs/op + + +BenchmarkAce_ParseParam 5000000 397 ns/op 64 B/op 1 allocs/op +BenchmarkBear_ParseParam 1000000 1084 ns/op 467 B/op 5 allocs/op +BenchmarkBeego_ParseParam 1000000 1171 ns/op 64 B/op 4 allocs/op +BenchmarkBone_ParseParam 1000000 1320 ns/op 464 B/op 4 allocs/op +BenchmarkDenco_ParseParam 5000000 316 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_ParseParam 20000000 106 ns/op 0 B/op 0 allocs/op +BenchmarkGin_ParseParam 20000000 97.3 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParseParam 1000000 1634 ns/op 664 B/op 8 allocs/op +BenchmarkGoji_ParseParam 2000000 928 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_ParseParam 2000000 986 ns/op 208 B/op 6 allocs/op +BenchmarkGoJsonRest_ParseParam 1000000 1816 ns/op 649 B/op 13 allocs/op +BenchmarkGoRestful_ParseParam 100000 13360 ns/op 4024 B/op 31 allocs/op +BenchmarkGorillaMux_ParseParam 500000 3366 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_ParseParam 10000000 225 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_ParseParam 2000000 706 ns/op 352 B/op 3 allocs/op +BenchmarkIris_ParseParam 30000000 50.8 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParseParam 5000000 406 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_ParseParam 20000000 101 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParseParam 1000000 2744 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_ParseParam 300000 5056 ns/op 1104 B/op 11 allocs/op +BenchmarkPat_ParseParam 1000000 2871 ns/op 1120 B/op 17 allocs/op +BenchmarkPossum_ParseParam 1000000 1701 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_ParseParam 1000000 1033 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_ParseParam 500000 5266 ns/op 1664 B/op 26 allocs/op +BenchmarkRivet_ParseParam 5000000 264 ns/op 48 B/op 1 allocs/op +BenchmarkTango_ParseParam 1000000 1387 ns/op 288 B/op 9 allocs/op +BenchmarkTigerTonic_ParseParam 1000000 3236 ns/op 992 B/op 16 allocs/op +BenchmarkTraffic_ParseParam 500000 5372 ns/op 2248 B/op 23 allocs/op +BenchmarkVulcan_ParseParam 2000000 949 ns/op 98 B/op 3 allocs/op + + +BenchmarkAce_Parse2Params 5000000 421 ns/op 64 B/op 1 allocs/op +BenchmarkBear_Parse2Params 1000000 1250 ns/op 496 B/op 5 allocs/op +BenchmarkBeego_Parse2Params 1000000 1436 ns/op 128 B/op 4 allocs/op +BenchmarkBone_Parse2Params 1000000 1192 ns/op 416 B/op 3 allocs/op +BenchmarkDenco_Parse2Params 5000000 373 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_Parse2Params 10000000 131 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Parse2Params 20000000 118 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Parse2Params 1000000 2030 ns/op 712 B/op 9 allocs/op +BenchmarkGoji_Parse2Params 2000000 946 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_Parse2Params 2000000 954 ns/op 192 B/op 5 allocs/op +BenchmarkGoJsonRest_Parse2Params 1000000 2251 ns/op 713 B/op 14 allocs/op +BenchmarkGoRestful_Parse2Params 100000 22051 ns/op 6856 B/op 39 allocs/op +BenchmarkGorillaMux_Parse2Params 500000 3574 ns/op 768 B/op 8 allocs/op +BenchmarkHttpRouter_Parse2Params 10000000 238 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_Parse2Params 1000000 1007 ns/op 384 B/op 4 allocs/op +BenchmarkIris_Parse2Params 30000000 52.0 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_Parse2Params 2000000 747 ns/op 128 B/op 5 allocs/op +BenchmarkLARS_Parse2Params 20000000 119 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Parse2Params 1000000 2984 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_Parse2Params 300000 4966 ns/op 1136 B/op 11 allocs/op +BenchmarkPat_Parse2Params 1000000 2879 ns/op 832 B/op 17 allocs/op +BenchmarkPossum_Parse2Params 1000000 1703 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Parse2Params 1000000 1187 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_Parse2Params 300000 5790 ns/op 1728 B/op 28 allocs/op +BenchmarkRivet_Parse2Params 5000000 395 ns/op 96 B/op 1 allocs/op +BenchmarkTango_Parse2Params 1000000 1832 ns/op 416 B/op 11 allocs/op +BenchmarkTigerTonic_Parse2Params 500000 5286 ns/op 1376 B/op 22 allocs/op +BenchmarkTraffic_Parse2Params 300000 5793 ns/op 2040 B/op 22 allocs/op +BenchmarkVulcan_Parse2Params 1000000 1059 ns/op 98 B/op 3 allocs/op + + +BenchmarkAce_ParseAll 200000 9285 ns/op 640 B/op 16 allocs/op +BenchmarkBear_ParseAll 50000 27281 ns/op 8928 B/op 110 allocs/op +BenchmarkBeego_ParseAll 100000 23191 ns/op 800 B/op 36 allocs/op +BenchmarkBone_ParseAll 50000 29121 ns/op 8048 B/op 90 allocs/op +BenchmarkDenco_ParseAll 300000 6850 ns/op 928 B/op 16 allocs/op +BenchmarkEcho_ParseAll 300000 4143 ns/op 0 B/op 0 allocs/op +BenchmarkGin_ParseAll 500000 3680 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParseAll 30000 41269 ns/op 13728 B/op 181 allocs/op +BenchmarkGoji_ParseAll 100000 19371 ns/op 5376 B/op 32 allocs/op +BenchmarkGojiv2_ParseAll 100000 22791 ns/op 4496 B/op 121 allocs/op +BenchmarkGoJsonRest_ParseAll 30000 48336 ns/op 13866 B/op 321 allocs/op +BenchmarkGoRestful_ParseAll 5000 447025 ns/op 125600 B/op 868 allocs/op +BenchmarkGorillaMux_ParseAll 10000 126807 ns/op 16560 B/op 198 allocs/op +BenchmarkHttpRouter_ParseAll 500000 4346 ns/op 640 B/op 16 allocs/op +BenchmarkHttpTreeMux_ParseAll 100000 15080 ns/op 5728 B/op 51 allocs/op +BenchmarkIris_ParseAll 1000000 2233 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParseAll 200000 10095 ns/op 1112 B/op 54 allocs/op +BenchmarkLARS_ParseAll 500000 3672 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParseAll 20000 72204 ns/op 24160 B/op 224 allocs/op +BenchmarkMartini_ParseAll 10000 134707 ns/op 25600 B/op 276 allocs/op +BenchmarkPat_ParseAll 30000 55703 ns/op 17264 B/op 343 allocs/op +BenchmarkPossum_ParseAll 50000 31801 ns/op 10816 B/op 78 allocs/op +BenchmarkR2router_ParseAll 100000 25061 ns/op 8352 B/op 120 allocs/op +BenchmarkRevel_ParseAll 10000 132607 ns/op 39424 B/op 652 allocs/op +BenchmarkRivet_ParseAll 300000 6797 ns/op 912 B/op 16 allocs/op +BenchmarkTango_ParseAll 50000 38662 ns/op 7664 B/op 240 allocs/op +BenchmarkTigerTonic_ParseAll 20000 72554 ns/op 19424 B/op 360 allocs/op +BenchmarkTraffic_ParseAll 10000 147408 ns/op 57776 B/op 642 allocs/op +BenchmarkVulcan_ParseAll 50000 28641 ns/op 2548 B/op 78 allocs/op ``` @@ -251,47 +325,98 @@ BenchmarkTraffic_ParseAll 10000 164938 ns/op 70161 B/op The GitHub API is rather large, consisting of 203 routes. The tasks are basically the same as in the benchmarks before. ``` -BenchmarkBeego_GithubStatic 500000 3880 ns/op 1148 B/op 31 allocs/op -BenchmarkDenco_GithubStatic 50000000 60.5 ns/op 0 B/op 0 allocs/op -BenchmarkGocraftWeb_GithubStatic 2000000 933 ns/op 328 B/op 6 allocs/op -BenchmarkGoji_GithubStatic 5000000 401 ns/op 0 B/op 0 allocs/op -BenchmarkGoJsonRest_GithubStatic 500000 6006 ns/op 1150 B/op 25 allocs/op -BenchmarkGorillaMux_GithubStatic 100000 18227 ns/op 456 B/op 6 allocs/op -BenchmarkHttpRouter_GithubStatic 50000000 63.2 ns/op 0 B/op 0 allocs/op -BenchmarkHttpTreeMux_GithubStatic 50000000 65.1 ns/op 0 B/op 0 allocs/op -BenchmarkKocha_GithubStatic 20000000 99.5 ns/op 0 B/op 0 allocs/op -BenchmarkMartini_GithubStatic 100000 18546 ns/op 927 B/op 11 allocs/op -BenchmarkPat_GithubStatic 200000 11503 ns/op 3754 B/op 76 allocs/op -BenchmarkTigerTonic_GithubStatic 5000000 308 ns/op 49 B/op 1 allocs/op -BenchmarkTraffic_GithubStatic 50000 44923 ns/op 23105 B/op 168 allocs/op - -BenchmarkBeego_GithubParam 50000 44645 ns/op 2973 B/op 50 allocs/op -BenchmarkDenco_GithubParam 5000000 643 ns/op 115 B/op 3 allocs/op -BenchmarkGocraftWeb_GithubParam 1000000 1855 ns/op 750 B/op 10 allocs/op -BenchmarkGoji_GithubParam 1000000 1314 ns/op 340 B/op 2 allocs/op -BenchmarkGoJsonRest_GithubParam 200000 8427 ns/op 2159 B/op 32 allocs/op -BenchmarkGorillaMux_GithubParam 200000 11485 ns/op 813 B/op 7 allocs/op -BenchmarkHttpRouter_GithubParam 5000000 304 ns/op 97 B/op 1 allocs/op -BenchmarkHttpTreeMux_GithubParam 2000000 770 ns/op 340 B/op 2 allocs/op -BenchmarkKocha_GithubParam 5000000 754 ns/op 132 B/op 4 allocs/op -BenchmarkMartini_GithubParam 100000 22637 ns/op 1284 B/op 12 allocs/op -BenchmarkPat_GithubParam 500000 7319 ns/op 2538 B/op 44 allocs/op -BenchmarkTigerTonic_GithubParam 500000 4722 ns/op 1467 B/op 26 allocs/op -BenchmarkTraffic_GithubParam 100000 18700 ns/op 7076 B/op 58 allocs/op - -BenchmarkBeego_GithubAll 100 23430165 ns/op 502614 B/op 9871 allocs/op -BenchmarkDenco_GithubAll 10000 120365 ns/op 21219 B/op 506 allocs/op -BenchmarkGocraftWeb_GithubAll 5000 358982 ns/op 139091 B/op 1903 allocs/op -BenchmarkGoji_GithubAll 5000 604522 ns/op 56896 B/op 340 allocs/op -BenchmarkGoJsonRest_GithubAll 1000 1645794 ns/op 404222 B/op 6303 allocs/op -BenchmarkGorillaMux_GithubAll 500 6634737 ns/op 152277 B/op 1402 allocs/op -BenchmarkHttpRouter_GithubAll 50000 51138 ns/op 14039 B/op 168 allocs/op -BenchmarkHttpTreeMux_GithubAll 10000 132507 ns/op 56907 B/op 340 allocs/op -BenchmarkKocha_GithubAll 10000 143398 ns/op 24117 B/op 676 allocs/op -BenchmarkMartini_GithubAll 200 9802351 ns/op 258349 B/op 2713 allocs/op -BenchmarkPat_GithubAll 500 4154815 ns/op 1539081 B/op 24970 allocs/op -BenchmarkTigerTonic_GithubAll 2000 920839 ns/op 247085 B/op 5171 allocs/op -BenchmarkTraffic_GithubAll 200 8087393 ns/op 3143039 B/op 23958 allocs/op +BenchmarkAce_GithubStatic 10000000 223 ns/op 0 B/op 0 allocs/op +BenchmarkBear_GithubStatic 2000000 613 ns/op 120 B/op 3 allocs/op +BenchmarkBeego_GithubStatic 1000000 1173 ns/op 64 B/op 4 allocs/op +BenchmarkBone_GithubStatic 100000 14740 ns/op 2880 B/op 60 allocs/op +BenchmarkDenco_GithubStatic 30000000 46.8 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_GithubStatic 20000000 111 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GithubStatic 20000000 114 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GithubStatic 1000000 1140 ns/op 296 B/op 5 allocs/op +BenchmarkGoji_GithubStatic 5000000 260 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_GithubStatic 2000000 810 ns/op 160 B/op 4 allocs/op +BenchmarkGoRestful_GithubStatic 30000 43835 ns/op 3720 B/op 32 allocs/op +BenchmarkGoJsonRest_GithubStatic 1000000 1501 ns/op 329 B/op 11 allocs/op +BenchmarkGorillaMux_GithubStatic 100000 20281 ns/op 448 B/op 7 allocs/op +BenchmarkHttpRouter_GithubStatic 30000000 56.5 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_GithubStatic 20000000 66.5 ns/op 0 B/op 0 allocs/op +BenchmarkIris_GithubStatic 30000000 48.5 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GithubStatic 20000000 76.2 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_GithubStatic 20000000 109 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GithubStatic 1000000 2751 ns/op 752 B/op 8 allocs/op +BenchmarkMartini_GithubStatic 100000 15170 ns/op 784 B/op 10 allocs/op +BenchmarkPat_GithubStatic 100000 12500 ns/op 3648 B/op 76 allocs/op +BenchmarkPossum_GithubStatic 1000000 1338 ns/op 416 B/op 3 allocs/op +BenchmarkR2router_GithubStatic 2000000 672 ns/op 144 B/op 4 allocs/op +BenchmarkRevel_GithubStatic 500000 4906 ns/op 1248 B/op 23 allocs/op +BenchmarkRivet_GithubStatic 10000000 121 ns/op 0 B/op 0 allocs/op +BenchmarkTango_GithubStatic 1000000 1620 ns/op 256 B/op 9 allocs/op +BenchmarkTigerTonic_GithubStatic 5000000 350 ns/op 48 B/op 1 allocs/op +BenchmarkTraffic_GithubStatic 30000 55736 ns/op 18904 B/op 148 allocs/op +BenchmarkVulcan_GithubStatic 1000000 1266 ns/op 98 B/op 3 allocs/op + + +BenchmarkAce_GithubParam 2000000 584 ns/op 96 B/op 1 allocs/op +BenchmarkBear_GithubParam 1000000 1628 ns/op 496 B/op 5 allocs/op +BenchmarkBeego_GithubParam 1000000 1667 ns/op 192 B/op 4 allocs/op +BenchmarkBone_GithubParam 300000 6553 ns/op 1456 B/op 16 allocs/op +BenchmarkDenco_GithubParam 3000000 525 ns/op 128 B/op 1 allocs/op +BenchmarkEcho_GithubParam 10000000 186 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GithubParam 10000000 184 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GithubParam 1000000 2264 ns/op 712 B/op 9 allocs/op +BenchmarkGoji_GithubParam 1000000 1355 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_GithubParam 1000000 1707 ns/op 256 B/op 7 allocs/op +BenchmarkGoJsonRest_GithubParam 1000000 2794 ns/op 713 B/op 14 allocs/op +BenchmarkGoRestful_GithubParam 10000 134707 ns/op 3016 B/op 31 allocs/op +BenchmarkGorillaMux_GithubParam 200000 11270 ns/op 768 B/op 8 allocs/op +BenchmarkHttpRouter_GithubParam 5000000 367 ns/op 96 B/op 1 allocs/op +BenchmarkHttpTreeMux_GithubParam 1000000 1198 ns/op 384 B/op 4 allocs/op +BenchmarkIris_GithubParam 30000000 49.3 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GithubParam 2000000 872 ns/op 128 B/op 5 allocs/op +BenchmarkLARS_GithubParam 10000000 189 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GithubParam 1000000 3210 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_GithubParam 200000 13075 ns/op 1136 B/op 11 allocs/op +BenchmarkPat_GithubParam 200000 8415 ns/op 2464 B/op 48 allocs/op +BenchmarkPossum_GithubParam 1000000 1893 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_GithubParam 1000000 1271 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_GithubParam 200000 6570 ns/op 1744 B/op 28 allocs/op +BenchmarkRivet_GithubParam 3000000 554 ns/op 96 B/op 1 allocs/op +BenchmarkTango_GithubParam 1000000 2423 ns/op 480 B/op 12 allocs/op +BenchmarkTigerTonic_GithubParam 300000 6103 ns/op 1408 B/op 22 allocs/op +BenchmarkTraffic_GithubParam 100000 20411 ns/op 5992 B/op 52 allocs/op +BenchmarkVulcan_GithubParam 1000000 1848 ns/op 98 B/op 3 allocs/op + + +BenchmarkAce_GithubAll 10000 121206 ns/op 13792 B/op 167 allocs/op +BenchmarkBear_GithubAll 10000 348919 ns/op 86448 B/op 943 allocs/op +BenchmarkBeego_GithubAll 5000 296816 ns/op 16608 B/op 524 allocs/op +BenchmarkBone_GithubAll 500 2502143 ns/op 548736 B/op 7241 allocs/op +BenchmarkDenco_GithubAll 20000 99705 ns/op 20224 B/op 167 allocs/op +BenchmarkEcho_GithubAll 30000 45469 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GithubAll 50000 39402 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GithubAll 5000 446025 ns/op 131656 B/op 1686 allocs/op +BenchmarkGoji_GithubAll 3000 547698 ns/op 56112 B/op 334 allocs/op +BenchmarkGojiv2_GithubAll 2000 763043 ns/op 118864 B/op 3103 allocs/op +BenchmarkGoJsonRest_GithubAll 5000 538030 ns/op 134371 B/op 2737 allocs/op +BenchmarkGoRestful_GithubAll 100 14870850 ns/op 837832 B/op 6913 allocs/op +BenchmarkGorillaMux_GithubAll 200 6690383 ns/op 144464 B/op 1588 allocs/op +BenchmarkHttpRouter_GithubAll 20000 65653 ns/op 13792 B/op 167 allocs/op +BenchmarkHttpTreeMux_GithubAll 10000 215312 ns/op 65856 B/op 671 allocs/op +BenchmarkIris_GithubAll 100000 20731 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GithubAll 10000 167209 ns/op 23304 B/op 843 allocs/op +BenchmarkLARS_GithubAll 30000 41069 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GithubAll 2000 665038 ns/op 201138 B/op 1803 allocs/op +BenchmarkMartini_GithubAll 300 5433644 ns/op 228213 B/op 2483 allocs/op +BenchmarkPat_GithubAll 300 4210240 ns/op 1499569 B/op 27435 allocs/op +BenchmarkPossum_GithubAll 10000 255114 ns/op 84448 B/op 609 allocs/op +BenchmarkR2router_GithubAll 10000 237113 ns/op 77328 B/op 979 allocs/op +BenchmarkRevel_GithubAll 2000 1150565 ns/op 337424 B/op 5512 allocs/op +BenchmarkRivet_GithubAll 20000 96555 ns/op 16272 B/op 167 allocs/op +BenchmarkTango_GithubAll 5000 417423 ns/op 87075 B/op 2267 allocs/op +BenchmarkTigerTonic_GithubAll 2000 994556 ns/op 233680 B/op 5035 allocs/op +BenchmarkTraffic_GithubAll 200 7770444 ns/op 2659331 B/op 21848 allocs/op +BenchmarkVulcan_GithubAll 5000 292216 ns/op 19894 B/op 609 allocs/op + ``` ### [Google+](https://developers.google.com/+/api/latest/) @@ -299,90 +424,141 @@ BenchmarkTraffic_GithubAll 200 8087393 ns/op 3143039 B/op Last but not least the Google+ API, consisting of 13 routes. In reality this is just a subset of a much larger API. ``` -BenchmarkBeego_GPlusStatic 1000000 2321 ns/op 808 B/op 11 allocs/op -BenchmarkDenco_GPlusStatic 50000000 37.2 ns/op 0 B/op 0 allocs/op -BenchmarkGocraftWeb_GPlusStatic 2000000 862 ns/op 312 B/op 6 allocs/op -BenchmarkGoji_GPlusStatic 10000000 270 ns/op 0 B/op 0 allocs/op -BenchmarkGoJsonRest_GPlusStatic 500000 5827 ns/op 1136 B/op 25 allocs/op -BenchmarkGorillaMux_GPlusStatic 1000000 1793 ns/op 456 B/op 6 allocs/op -BenchmarkHttpRouter_GPlusStatic 50000000 34.6 ns/op 0 B/op 0 allocs/op -BenchmarkHttpTreeMux_GPlusStatic 50000000 35.4 ns/op 0 B/op 0 allocs/op -BenchmarkKocha_GPlusStatic 50000000 63.8 ns/op 0 B/op 0 allocs/op -BenchmarkMartini_GPlusStatic 500000 4887 ns/op 927 B/op 11 allocs/op -BenchmarkPat_GPlusStatic 5000000 336 ns/op 98 B/op 2 allocs/op -BenchmarkTigerTonic_GPlusStatic 10000000 186 ns/op 33 B/op 1 allocs/op -BenchmarkTraffic_GPlusStatic 500000 3350 ns/op 1503 B/op 18 allocs/op - -BenchmarkBeego_GPlusParam 200000 7657 ns/op 1231 B/op 16 allocs/op -BenchmarkDenco_GPlusParam 5000000 365 ns/op 50 B/op 2 allocs/op -BenchmarkGocraftWeb_GPlusParam 1000000 1519 ns/op 684 B/op 9 allocs/op -BenchmarkGoji_GPlusParam 2000000 889 ns/op 340 B/op 2 allocs/op -BenchmarkGoJsonRest_GPlusParam 500000 7388 ns/op 1806 B/op 29 allocs/op -BenchmarkGorillaMux_GPlusParam 500000 4040 ns/op 780 B/op 7 allocs/op -BenchmarkHttpRouter_GPlusParam 10000000 203 ns/op 65 B/op 1 allocs/op -BenchmarkHttpTreeMux_GPlusParam 5000000 638 ns/op 340 B/op 2 allocs/op -BenchmarkKocha_GPlusParam 5000000 444 ns/op 58 B/op 2 allocs/op -BenchmarkMartini_GPlusParam 200000 8672 ns/op 1251 B/op 12 allocs/op -BenchmarkPat_GPlusParam 1000000 1895 ns/op 719 B/op 12 allocs/op -BenchmarkTigerTonic_GPlusParam 1000000 3166 ns/op 1085 B/op 18 allocs/op -BenchmarkTraffic_GPlusParam 500000 5369 ns/op 2030 B/op 22 allocs/op - -BenchmarkBeego_GPlus2Params 200000 9999 ns/op 1293 B/op 16 allocs/op -BenchmarkDenco_GPlus2Params 5000000 618 ns/op 115 B/op 3 allocs/op -BenchmarkGocraftWeb_GPlus2Params 1000000 1860 ns/op 750 B/op 10 allocs/op -BenchmarkGoji_GPlus2Params 1000000 1296 ns/op 340 B/op 2 allocs/op -BenchmarkGoJsonRest_GPlus2Params 200000 8516 ns/op 2178 B/op 32 allocs/op -BenchmarkGorillaMux_GPlus2Params 200000 9007 ns/op 812 B/op 7 allocs/op -BenchmarkHttpRouter_GPlus2Params 10000000 246 ns/op 65 B/op 1 allocs/op -BenchmarkHttpTreeMux_GPlus2Params 2000000 751 ns/op 340 B/op 2 allocs/op -BenchmarkKocha_GPlus2Params 5000000 744 ns/op 132 B/op 4 allocs/op -BenchmarkMartini_GPlus2Params 100000 27700 ns/op 1382 B/op 16 allocs/op -BenchmarkPat_GPlus2Params 500000 5981 ns/op 2347 B/op 34 allocs/op -BenchmarkTigerTonic_GPlus2Params 500000 5076 ns/op 1561 B/op 27 allocs/op -BenchmarkTraffic_GPlus2Params 200000 12711 ns/op 3599 B/op 34 allocs/op - -BenchmarkBeego_GPlusAll 10000 113601 ns/op 15897 B/op 217 allocs/op -BenchmarkDenco_GPlusAll 500000 5761 ns/op 880 B/op 27 allocs/op -BenchmarkGocraftWeb_GPlusAll 100000 20527 ns/op 8513 B/op 116 allocs/op -BenchmarkGoji_GPlusAll 200000 12312 ns/op 3746 B/op 22 allocs/op -BenchmarkGoJsonRest_GPlusAll 20000 99250 ns/op 23871 B/op 386 allocs/op -BenchmarkGorillaMux_GPlusAll 50000 63046 ns/op 9655 B/op 90 allocs/op -BenchmarkHttpRouter_GPlusAll 1000000 2513 ns/op 655 B/op 11 allocs/op -BenchmarkHttpTreeMux_GPlusAll 500000 7706 ns/op 3748 B/op 22 allocs/op -BenchmarkKocha_GPlusAll 500000 6858 ns/op 1017 B/op 35 allocs/op -BenchmarkMartini_GPlusAll 10000 155402 ns/op 16368 B/op 179 allocs/op -BenchmarkPat_GPlusAll 50000 47397 ns/op 17270 B/op 302 allocs/op -BenchmarkTigerTonic_GPlusAll 50000 49864 ns/op 15160 B/op 311 allocs/op -BenchmarkTraffic_GPlusAll 10000 108007 ns/op 41779 B/op 430 allocs/op -``` - - -## Conclusions -First of all, there is no reason to use net/http's default [ServeMux](http://golang.org/pkg/net/http/#ServeMux), which is very limited and does not have especially good performance. There are enough alternatives coming in every flavor, choose the one you like best. - -Secondly, the broad range of functions of some of the frameworks comes at a high price in terms of performance. For example Martini has great flexibility, but very bad performance. Martini has the worst performance of all tested routers in a lot of the benchmarks. Beego seems to have some scalability problems and easily defeats Martini with even worse performance, when the number of parameters or routes is high. I really hope, that the routing of these packages can be optimized. I think the Go-ecosystem needs great feature-rich frameworks like these. - -Last but not least, we have to determine the performance champion. - -Denco and its predecessor Kocha-urlrouter seem to have great performance, but are not convenient to use as a router for the net/http package. A lot of extra work is necessary to use it as a http.Handler. [The README of Denco claims](https://github.com/naoina/denco/blob/b03dbb499269a597afd0db715d408ebba1329d04/README.md), that the package is not intended as a replacement for [http.ServeMux](http://golang.org/pkg/net/http/#ServeMux). - -[Goji](https://github.com/zenazn/goji/) looks very decent. It has great performance while also having a great range of features, more than any other router / framework in the top group. - -Currently no router can beat the performance of the [HttpRouter](https://github.com/julienschmidt/httprouter) package, which currently dominates nearly all benchmarks. - -In the end, performance can not be the (only) criterion for choosing a router. Play around a bit with some of the routers, and choose the one you like best. +BenchmarkAce_GPlusStatic 10000000 198 ns/op 0 B/op 0 allocs/op +BenchmarkBear_GPlusStatic 3000000 431 ns/op 104 B/op 3 allocs/op +BenchmarkBeego_GPlusStatic 2000000 943 ns/op 32 B/op 4 allocs/op +BenchmarkBone_GPlusStatic 10000000 204 ns/op 32 B/op 1 allocs/op +BenchmarkDenco_GPlusStatic 50000000 31.5 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_GPlusStatic 20000000 90.1 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlusStatic 20000000 88.8 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlusStatic 2000000 897 ns/op 280 B/op 5 allocs/op +BenchmarkGoji_GPlusStatic 10000000 201 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_GPlusStatic 2000000 626 ns/op 160 B/op 4 allocs/op +BenchmarkGoJsonRest_GPlusStatic 1000000 1163 ns/op 329 B/op 11 allocs/op +BenchmarkGoRestful_GPlusStatic 200000 7915 ns/op 2360 B/op 26 allocs/op +BenchmarkGorillaMux_GPlusStatic 1000000 1892 ns/op 448 B/op 7 allocs/op +BenchmarkHttpRouter_GPlusStatic 50000000 33.7 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_GPlusStatic 30000000 42.3 ns/op 0 B/op 0 allocs/op +BenchmarkIris_GPlusStatic 30000000 51.9 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlusStatic 30000000 58.5 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_GPlusStatic 20000000 88.5 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlusStatic 1000000 2237 ns/op 752 B/op 8 allocs/op +BenchmarkMartini_GPlusStatic 500000 3892 ns/op 784 B/op 10 allocs/op +BenchmarkPat_GPlusStatic 5000000 336 ns/op 96 B/op 2 allocs/op +BenchmarkPossum_GPlusStatic 1000000 1188 ns/op 416 B/op 3 allocs/op +BenchmarkR2router_GPlusStatic 3000000 560 ns/op 144 B/op 4 allocs/op +BenchmarkRevel_GPlusStatic 500000 4448 ns/op 1232 B/op 23 allocs/op +BenchmarkRivet_GPlusStatic 20000000 80.3 ns/op 0 B/op 0 allocs/op +BenchmarkTango_GPlusStatic 1000000 1153 ns/op 208 B/op 9 allocs/op +BenchmarkTigerTonic_GPlusStatic 10000000 223 ns/op 32 B/op 1 allocs/op +BenchmarkTraffic_GPlusStatic 1000000 2782 ns/op 1192 B/op 15 allocs/op +BenchmarkVulcan_GPlusStatic 2000000 752 ns/op 98 B/op 3 allocs/op + + +BenchmarkAce_GPlusParam 3000000 423 ns/op 64 B/op 1 allocs/op +BenchmarkBear_GPlusParam 1000000 1094 ns/op 480 B/op 5 allocs/op +BenchmarkBeego_GPlusParam 1000000 1317 ns/op 128 B/op 4 allocs/op +BenchmarkBone_GPlusParam 1000000 1063 ns/op 384 B/op 3 allocs/op +BenchmarkDenco_GPlusParam 5000000 314 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_GPlusParam 20000000 120 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlusParam 20000000 116 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlusParam 1000000 1728 ns/op 648 B/op 8 allocs/op +BenchmarkGoji_GPlusParam 2000000 859 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_GPlusParam 2000000 935 ns/op 176 B/op 5 allocs/op +BenchmarkGoJsonRest_GPlusParam 1000000 1961 ns/op 649 B/op 13 allocs/op +BenchmarkGoRestful_GPlusParam 100000 15490 ns/op 2760 B/op 29 allocs/op +BenchmarkGorillaMux_GPlusParam 500000 3954 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_GPlusParam 10000000 236 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_GPlusParam 2000000 821 ns/op 352 B/op 3 allocs/op +BenchmarkIris_GPlusParam 30000000 53.7 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlusParam 3000000 433 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_GPlusParam 10000000 121 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlusParam 1000000 3153 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_GPlusParam 300000 5510 ns/op 1104 B/op 11 allocs/op +BenchmarkPat_GPlusParam 1000000 2166 ns/op 688 B/op 12 allocs/op +BenchmarkPossum_GPlusParam 1000000 1797 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_GPlusParam 1000000 1107 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_GPlusParam 500000 5534 ns/op 1664 B/op 26 allocs/op +BenchmarkRivet_GPlusParam 5000000 304 ns/op 48 B/op 1 allocs/op +BenchmarkTango_GPlusParam 1000000 1541 ns/op 272 B/op 9 allocs/op +BenchmarkTigerTonic_GPlusParam 500000 3604 ns/op 1040 B/op 16 allocs/op +BenchmarkTraffic_GPlusParam 500000 5780 ns/op 1976 B/op 21 allocs/op +BenchmarkVulcan_GPlusParam 1000000 1066 ns/op 98 B/op 3 allocs/op + + +BenchmarkAce_GPlus2Params 3000000 465 ns/op 64 B/op 1 allocs/op +BenchmarkBear_GPlus2Params 1000000 1410 ns/op 496 B/op 5 allocs/op +BenchmarkBeego_GPlus2Params 1000000 1753 ns/op 256 B/op 4 allocs/op +BenchmarkBone_GPlus2Params 1000000 2846 ns/op 736 B/op 7 allocs/op +BenchmarkDenco_GPlus2Params 5000000 407 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_GPlus2Params 10000000 166 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlus2Params 10000000 148 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlus2Params 1000000 2112 ns/op 712 B/op 9 allocs/op +BenchmarkGoji_GPlus2Params 1000000 1202 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_GPlus2Params 1000000 1796 ns/op 256 B/op 8 allocs/op +BenchmarkGoJsonRest_GPlus2Params 1000000 2628 ns/op 713 B/op 14 allocs/op +BenchmarkGoRestful_GPlus2Params 100000 18971 ns/op 2920 B/op 31 allocs/op +BenchmarkGorillaMux_GPlus2Params 200000 8545 ns/op 768 B/op 8 allocs/op +BenchmarkHttpRouter_GPlus2Params 5000000 269 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_GPlus2Params 1000000 1108 ns/op 384 B/op 4 allocs/op +BenchmarkIris_GPlus2Params 30000000 53.3 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlus2Params 2000000 818 ns/op 128 B/op 5 allocs/op +BenchmarkLARS_GPlus2Params 10000000 149 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlus2Params 1000000 2937 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_GPlus2Params 200000 13015 ns/op 1232 B/op 15 allocs/op +BenchmarkPat_GPlus2Params 200000 6500 ns/op 2256 B/op 34 allocs/op +BenchmarkPossum_GPlus2Params 1000000 1681 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_GPlus2Params 1000000 1162 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_GPlus2Params 500000 5910 ns/op 1760 B/op 28 allocs/op +BenchmarkRivet_GPlus2Params 5000000 411 ns/op 96 B/op 1 allocs/op +BenchmarkTango_GPlus2Params 1000000 1874 ns/op 448 B/op 11 allocs/op +BenchmarkTigerTonic_GPlus2Params 500000 5584 ns/op 1456 B/op 22 allocs/op +BenchmarkTraffic_GPlus2Params 200000 12500 ns/op 3272 B/op 31 allocs/op +BenchmarkVulcan_GPlus2Params 1000000 1486 ns/op 98 B/op 3 allocs/op + + +BenchmarkAce_GPlusAll 300000 5583 ns/op 640 B/op 11 allocs/op +BenchmarkBear_GPlusAll 100000 15530 ns/op 5488 B/op 61 allocs/op +BenchmarkBeego_GPlusAll 100000 17470 ns/op 1440 B/op 44 allocs/op +BenchmarkBone_GPlusAll 100000 19361 ns/op 4912 B/op 61 allocs/op +BenchmarkDenco_GPlusAll 500000 4558 ns/op 672 B/op 11 allocs/op +BenchmarkEcho_GPlusAll 1000000 2290 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlusAll 1000000 1951 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlusAll 100000 23171 ns/op 8040 B/op 103 allocs/op +BenchmarkGoji_GPlusAll 200000 12025 ns/op 3696 B/op 22 allocs/op +BenchmarkGojiv2_GPlusAll 100000 15520 ns/op 2640 B/op 76 allocs/op +BenchmarkGoJsonRest_GPlusAll 50000 28341 ns/op 8117 B/op 170 allocs/op +BenchmarkGoRestful_GPlusAll 10000 168209 ns/op 38664 B/op 389 allocs/op +BenchmarkGorillaMux_GPlusAll 20000 63253 ns/op 9248 B/op 102 allocs/op +BenchmarkHttpRouter_GPlusAll 500000 3066 ns/op 640 B/op 11 allocs/op +BenchmarkHttpTreeMux_GPlusAll 200000 10690 ns/op 4032 B/op 38 allocs/op +BenchmarkIris_GPlusAll 1000000 1155 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlusAll 200000 7400 ns/op 976 B/op 43 allocs/op +BenchmarkLARS_GPlusAll 1000000 2024 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlusAll 50000 36762 ns/op 12944 B/op 115 allocs/op +BenchmarkMartini_GPlusAll 20000 88555 ns/op 14448 B/op 165 allocs/op +BenchmarkPat_GPlusAll 30000 48602 ns/op 16576 B/op 298 allocs/op +BenchmarkPossum_GPlusAll 100000 15940 ns/op 5408 B/op 39 allocs/op +BenchmarkR2router_GPlusAll 100000 13560 ns/op 5040 B/op 63 allocs/op +BenchmarkRevel_GPlusAll 20000 71154 ns/op 21136 B/op 342 allocs/op +BenchmarkRivet_GPlusAll 300000 4613 ns/op 768 B/op 11 allocs/op +BenchmarkTango_GPlusAll 100000 21081 ns/op 4304 B/op 129 allocs/op +BenchmarkTigerTonic_GPlusAll 30000 55203 ns/op 14256 B/op 272 allocs/op +BenchmarkTraffic_GPlusAll 10000 108306 ns/op 37360 B/op 392 allocs/op +BenchmarkVulcan_GPlusAll 100000 15290 ns/op 1274 B/op 39 allocs/op +``` ## Usage If you'd like to run these benchmarks locally, you'll need to install the packge first: ```bash -go get github.com/julienschmidt/go-http-routing-benchmark +go get github.com/iris-contrib/go-http-routing-benchmark ``` This may take a while due to the large number of dependencies that need to be downloaded. Once that command completes, you can run the full set of benchmarks like this: ```bash -cd $GOPATH/src/github.com/julienschmidt/go-http-routing-benchmark +cd $GOPATH/src/github.com/iris-contrib/go-http-routing-benchmark go test -bench=. ``` @@ -395,5 +571,5 @@ go test -timeout=2h -bench=. You can bench specific frameworks only by using a regular expression as the value of the `bench` parameter: ```bash -go test -bench="Martini|Gin|HttpMux" +go test -bench="Martini|Gin|HttpMux|Iris" ``` diff --git a/bench_test.go b/bench_test.go index 52e8c630..66596c11 100644 --- a/bench_test.go +++ b/bench_test.go @@ -186,6 +186,14 @@ func BenchmarkHttpTreeMux_Param(b *testing.B) { r, _ := http.NewRequest("GET", "/user/gordon", nil) benchRequest(b, router, r) } + +func BenchmarkIris_Param(b *testing.B) { + router := loadIrisSingle("GET", "/user/:name", irisHandler) + + r, _ := http.NewRequest("GET", "/user/gordon", nil) + benchRequest(b, router, r) +} + func BenchmarkKocha_Param(b *testing.B) { handler := new(kochaHandler) router := loadKochaSingle( @@ -373,6 +381,12 @@ func BenchmarkHttpTreeMux_Param5(b *testing.B) { r, _ := http.NewRequest("GET", fiveRoute, nil) benchRequest(b, router, r) } +func BenchmarkIris_Param5(b *testing.B) { + router := loadIrisSingle("GET", fiveColon, irisHandler) + + r, _ := http.NewRequest("GET", fiveRoute, nil) + benchRequest(b, router, r) +} func BenchmarkKocha_Param5(b *testing.B) { handler := new(kochaHandler) router := loadKochaSingle( @@ -559,6 +573,12 @@ func BenchmarkHttpTreeMux_Param20(b *testing.B) { r, _ := http.NewRequest("GET", twentyRoute, nil) benchRequest(b, router, r) } +func BenchmarIris_Param20(b *testing.B) { + router := loadIrisSingle("GET", twentyColon, irisHandler) + + r, _ := http.NewRequest("GET", twentyRoute, nil) + benchRequest(b, router, r) +} func BenchmarkKocha_Param20(b *testing.B) { handler := new(kochaHandler) router := loadKochaSingle( @@ -741,6 +761,13 @@ func BenchmarkHttpTreeMux_ParamWrite(b *testing.B) { r, _ := http.NewRequest("GET", "/user/gordon", nil) benchRequest(b, router, r) } +func BenchmarkIris_ParamWrite(b *testing.B) { + router := loadIrisSingle("GET", "/user/:name", irisHandlerWrite) + + r, _ := http.NewRequest("GET", "/user/gordon", nil) + benchRequest(b, router, r) +} + func BenchmarkKocha_ParamWrite(b *testing.B) { handler := new(kochaHandler) router := loadKochaSingle( diff --git a/full_all_benchmark.md b/full_all_benchmark.md new file mode 100644 index 00000000..5c0c7c9e --- /dev/null +++ b/full_all_benchmark.md @@ -0,0 +1,596 @@ +``` +D:\Projects\Golang\mygopath\src\github.com\kataras\go-http-routing-benchmark>go test -bench=. -timeout=60m +#GithubAPI Routes: 203 + Ace: 48992 Bytes + Bear: 161704 Bytes + Beego: 144536 Bytes + Bone: 97696 Bytes + Denco: 36728 Bytes + Echo: 76424 Bytes + Gin: 52464 Bytes + GocraftWeb: 95304 Bytes + Goji: 86104 Bytes + Gojiv2: 144408 Bytes + GoJsonRest: 134072 Bytes + GoRestful: 1395560 Bytes + GorillaMux: 1494848 Bytes + HttpRouter: 37464 Bytes + HttpTreeMux: 78736 Bytes + Iris: 62312 Bytes + Kocha: 785120 Bytes + LARS: 49016 Bytes + Macaron: 127304 Bytes + Martini: 556192 Bytes + Pat: 21200 Bytes + Possum: 82928 Bytes + R2router: 47104 Bytes + Revel: 141504 Bytes + Rivet: 42840 Bytes + Tango: 54584 Bytes + TigerTonic: 96032 Bytes + Traffic: 1053776 Bytes + Vulcan: 464976 Bytes + +#GPlusAPI Routes: 13 + Ace: 3600 Bytes + Bear: 7112 Bytes + Beego: 9712 Bytes + Bone: 6448 Bytes + Denco: 3256 Bytes + Echo: 7224 Bytes + Gin: 3856 Bytes + GocraftWeb: 7496 Bytes + Goji: 2912 Bytes + Gojiv2: 7376 Bytes + GoJsonRest: 11416 Bytes + GoRestful: 87608 Bytes + GorillaMux: 71072 Bytes + HttpRouter: 2712 Bytes + HttpTreeMux: 7376 Bytes + Iris: 6480 Bytes + Kocha: 128880 Bytes + LARS: 3624 Bytes + Macaron: 8448 Bytes + Martini: 23936 Bytes + Pat: 1856 Bytes + Possum: 7248 Bytes + R2router: 3928 Bytes + Revel: 10768 Bytes + Rivet: 3064 Bytes + Tango: 4912 Bytes + TigerTonic: 9408 Bytes + Traffic: 49472 Bytes + Vulcan: 25496 Bytes + +#ParseAPI Routes: 26 + Ace: 6592 Bytes + Bear: 12320 Bytes + Beego: 18416 Bytes + Bone: 10992 Bytes + Denco: 4184 Bytes + Echo: 8144 Bytes + Gin: 6816 Bytes + GocraftWeb: 12800 Bytes + Goji: 5232 Bytes + Gojiv2: 14464 Bytes + GoJsonRest: 14088 Bytes + GoRestful: 126216 Bytes + GorillaMux: 122184 Bytes + HttpRouter: 4976 Bytes + HttpTreeMux: 7784 Bytes + Iris: 9928 Bytes + Kocha: 181712 Bytes + LARS: 6616 Bytes + Macaron: 13232 Bytes + Martini: 45952 Bytes + Pat: 2560 Bytes + Possum: 10224 Bytes + R2router: 7056 Bytes + Revel: 15488 Bytes + Rivet: 5680 Bytes + Tango: 8664 Bytes + TigerTonic: 9840 Bytes + Traffic: 93480 Bytes + Vulcan: 44712 Bytes + +#Static Routes: 157 + HttpServeMux: 18784 Bytes + Ace: 30080 Bytes + Bear: 30424 Bytes + Beego: 93768 Bytes + Bone: 37872 Bytes + Denco: 9696 Bytes + Echo: 61120 Bytes + Gin: 30400 Bytes + GocraftWeb: 55464 Bytes + Goji: 27200 Bytes + Gojiv2: 104464 Bytes + GoJsonRest: 135736 Bytes + GoRestful: 908200 Bytes + GorillaMux: 668496 Bytes + HttpRouter: 21128 Bytes + HttpTreeMux: 73384 Bytes + Iris: 37264 Bytes + Kocha: 114816 Bytes + LARS: 30104 Bytes + Macaron: 35136 Bytes + Martini: 308784 Bytes + Pat: 20464 Bytes + Possum: 90848 Bytes + R2router: 23712 Bytes + Revel: 93392 Bytes + Rivet: 23880 Bytes + Tango: 28008 Bytes + TigerTonic: 80320 Bytes + Traffic: 624432 Bytes + Vulcan: 369144 Bytes + +PASS +BenchmarkAce_Param 5000000 347 ns/op 32 B/op 1 allocs/op +BenchmarkBear_Param 1000000 1313 ns/op 456 B/op 5 allocs/op +BenchmarkBeego_Param 1000000 1173 ns/op 64 B/op 4 allocs/op +BenchmarkBone_Param 1000000 1255 ns/op 384 B/op 3 allocs/op +BenchmarkDenco_Param 10000000 230 ns/op 32 B/op 1 allocs/op +BenchmarkEcho_Param 20000000 91.8 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Param 20000000 87.0 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Param 1000000 1961 ns/op 648 B/op 8 allocs/op +BenchmarkGoji_Param 2000000 979 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_Param 2000000 837 ns/op 176 B/op 5 allocs/op +BenchmarkGoJsonRest_Param 1000000 2129 ns/op 649 B/op 13 allocs/op +BenchmarkGoRestful_Param 200000 8860 ns/op 2696 B/op 27 allocs/op +BenchmarkGorillaMux_Param 1000000 3152 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_Param 10000000 156 ns/op 32 B/op 1 allocs/op +BenchmarkHttpTreeMux_Param 2000000 901 ns/op 352 B/op 3 allocs/op +BenchmarkIris_Param 30000000 49.7 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_Param 3000000 411 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_Param 20000000 92.3 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Param 1000000 3269 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_Param 500000 5216 ns/op 1104 B/op 11 allocs/op +BenchmarkPat_Param 1000000 2203 ns/op 648 B/op 12 allocs/op +BenchmarkPossum_Param 1000000 1988 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Param 1000000 1235 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_Param 300000 6060 ns/op 1632 B/op 26 allocs/op +BenchmarkRivet_Param 5000000 263 ns/op 48 B/op 1 allocs/op +BenchmarkTango_Param 1000000 1436 ns/op 256 B/op 9 allocs/op +BenchmarkTigerTonic_Param 1000000 3699 ns/op 976 B/op 16 allocs/op +BenchmarkTraffic_Param 300000 5837 ns/op 1960 B/op 21 allocs/op +BenchmarkVulcan_Param 2000000 859 ns/op 98 B/op 3 allocs/op +BenchmarkAce_Param5 2000000 661 ns/op 160 B/op 1 allocs/op +BenchmarkBear_Param5 1000000 1770 ns/op 501 B/op 5 allocs/op +BenchmarkBeego_Param5 1000000 1668 ns/op 128 B/op 4 allocs/op +BenchmarkBone_Param5 1000000 1687 ns/op 432 B/op 3 allocs/op +BenchmarkDenco_Param5 2000000 636 ns/op 160 B/op 1 allocs/op +BenchmarkEcho_Param5 10000000 163 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Param5 10000000 147 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Param5 1000000 3091 ns/op 920 B/op 11 allocs/op +BenchmarkGoji_Param5 1000000 1294 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_Param5 1000000 1175 ns/op 240 B/op 5 allocs/op +BenchmarkGoJsonRest_Param5 1000000 3989 ns/op 1097 B/op 16 allocs/op +BenchmarkGoRestful_Param5 200000 10665 ns/op 2872 B/op 27 allocs/op +BenchmarkGorillaMux_Param5 500000 4872 ns/op 816 B/op 8 allocs/op +BenchmarkHttpRouter_Param5 3000000 499 ns/op 160 B/op 1 allocs/op +BenchmarkHttpTreeMux_Param5 1000000 2133 ns/op 576 B/op 6 allocs/op +BenchmarkIris_Param5 30000000 49.3 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_Param5 1000000 1917 ns/op 440 B/op 10 allocs/op +BenchmarkLARS_Param5 10000000 155 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Param5 1000000 3742 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_Param5 300000 7177 ns/op 1232 B/op 11 allocs/op +BenchmarkPat_Param5 300000 5273 ns/op 964 B/op 32 allocs/op +BenchmarkPossum_Param5 1000000 2037 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Param5 1000000 1569 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_Param5 200000 7785 ns/op 1984 B/op 33 allocs/op +BenchmarkRivet_Param5 2000000 867 ns/op 240 B/op 1 allocs/op +BenchmarkTango_Param5 1000000 3771 ns/op 944 B/op 17 allocs/op +BenchmarkTigerTonic_Param5 200000 11565 ns/op 2471 B/op 38 allocs/op +BenchmarkTraffic_Param5 200000 8700 ns/op 2248 B/op 25 allocs/op +BenchmarkVulcan_Param5 1000000 1122 ns/op 98 B/op 3 allocs/op +BenchmarkAce_Param20 1000000 1707 ns/op 640 B/op 1 allocs/op +BenchmarkBear_Param20 300000 5340 ns/op 1665 B/op 5 allocs/op +BenchmarkBeego_Param20 500000 4020 ns/op 192 B/op 4 allocs/op +BenchmarkBone_Param20 300000 7937 ns/op 2540 B/op 5 allocs/op +BenchmarkDenco_Param20 1000000 2145 ns/op 640 B/op 1 allocs/op +BenchmarkEcho_Param20 3000000 439 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Param20 5000000 358 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Param20 200000 10870 ns/op 3796 B/op 15 allocs/op +BenchmarkGoji_Param20 1000000 4127 ns/op 1247 B/op 2 allocs/op +BenchmarkGojiv2_Param20 1000000 1969 ns/op 480 B/op 5 allocs/op +BenchmarkGoJsonRest_Param20 100000 13760 ns/op 4484 B/op 20 allocs/op +BenchmarkGoRestful_Param20 100000 18921 ns/op 5443 B/op 29 allocs/op +BenchmarkGorillaMux_Param20 200000 11510 ns/op 2923 B/op 10 allocs/op +BenchmarkHttpRouter_Param20 1000000 1513 ns/op 640 B/op 1 allocs/op +BenchmarkHttpTreeMux_Param20 200000 9770 ns/op 3194 B/op 10 allocs/op +BenchmarkKocha_Param20 300000 5990 ns/op 1808 B/op 27 allocs/op +BenchmarkLARS_Param20 5000000 344 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Param20 200000 9670 ns/op 2892 B/op 11 allocs/op +BenchmarkMartini_Param20 100000 13810 ns/op 3597 B/op 13 allocs/op +BenchmarkPat_Param20 100000 24021 ns/op 4687 B/op 111 allocs/op +BenchmarkPossum_Param20 1000000 1986 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Param20 300000 7117 ns/op 2283 B/op 7 allocs/op +BenchmarkRevel_Param20 100000 17220 ns/op 5511 B/op 52 allocs/op +BenchmarkRivet_Param20 1000000 2958 ns/op 1024 B/op 1 allocs/op +BenchmarkTango_Param20 100000 20371 ns/op 8224 B/op 47 allocs/op +BenchmarkTigerTonic_Param20 30000 45469 ns/op 10344 B/op 118 allocs/op +BenchmarkTraffic_Param20 50000 29161 ns/op 7944 B/op 45 allocs/op +BenchmarkVulcan_Param20 1000000 1784 ns/op 98 B/op 3 allocs/op +BenchmarkAce_ParamWrite 3000000 447 ns/op 40 B/op 2 allocs/op +BenchmarkBear_ParamWrite 1000000 1370 ns/op 456 B/op 5 allocs/op +BenchmarkBeego_ParamWrite 1000000 1298 ns/op 72 B/op 5 allocs/op +BenchmarkBone_ParamWrite 1000000 1347 ns/op 384 B/op 3 allocs/op +BenchmarkDenco_ParamWrite 5000000 289 ns/op 32 B/op 1 allocs/op +BenchmarkEcho_ParamWrite 10000000 204 ns/op 8 B/op 1 allocs/op +BenchmarkGin_ParamWrite 10000000 181 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParamWrite 1000000 2096 ns/op 656 B/op 9 allocs/op +BenchmarkGoji_ParamWrite 1000000 1051 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_ParamWrite 1000000 1118 ns/op 208 B/op 7 allocs/op +BenchmarkGoJsonRest_ParamWrite 1000000 3461 ns/op 1128 B/op 18 allocs/op +BenchmarkGoRestful_ParamWrite 200000 9085 ns/op 2704 B/op 28 allocs/op +BenchmarkGorillaMux_ParamWrite 1000000 3290 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_ParamWrite 10000000 211 ns/op 32 B/op 1 allocs/op +BenchmarkHttpTreeMux_ParamWrite 2000000 967 ns/op 352 B/op 3 allocs/op +BenchmarkIris_ParamWrite 10000000 145 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParamWrite 3000000 476 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_ParamWrite 10000000 174 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParamWrite 1000000 3847 ns/op 1144 B/op 13 allocs/op +BenchmarkMartini_ParamWrite 300000 5983 ns/op 1208 B/op 15 allocs/op +BenchmarkPat_ParamWrite 1000000 3637 ns/op 1072 B/op 17 allocs/op +BenchmarkPossum_ParamWrite 1000000 2011 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_ParamWrite 1000000 1335 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_ParamWrite 200000 7270 ns/op 2096 B/op 31 allocs/op +BenchmarkRivet_ParamWrite 3000000 540 ns/op 144 B/op 3 allocs/op +BenchmarkTango_ParamWrite 2000000 775 ns/op 136 B/op 4 allocs/op +BenchmarkTigerTonic_ParamWrite 300000 5723 ns/op 1408 B/op 22 allocs/op +BenchmarkTraffic_ParamWrite 300000 7230 ns/op 2384 B/op 25 allocs/op +BenchmarkVulcan_ParamWrite 2000000 854 ns/op 98 B/op 3 allocs/op +BenchmarkAce_GithubStatic 10000000 223 ns/op 0 B/op 0 allocs/op +BenchmarkBear_GithubStatic 2000000 613 ns/op 120 B/op 3 allocs/op +BenchmarkBeego_GithubStatic 1000000 1173 ns/op 64 B/op 4 allocs/op +BenchmarkBone_GithubStatic 100000 14740 ns/op 2880 B/op 60 allocs/op +BenchmarkDenco_GithubStatic 30000000 46.8 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_GithubStatic 20000000 111 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GithubStatic 20000000 114 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GithubStatic 1000000 1140 ns/op 296 B/op 5 allocs/op +BenchmarkGoji_GithubStatic 5000000 260 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_GithubStatic 2000000 810 ns/op 160 B/op 4 allocs/op +BenchmarkGoRestful_GithubStatic 30000 43835 ns/op 3720 B/op 32 allocs/op +BenchmarkGoJsonRest_GithubStatic 1000000 1501 ns/op 329 B/op 11 allocs/op +BenchmarkGorillaMux_GithubStatic 100000 20281 ns/op 448 B/op 7 allocs/op +BenchmarkHttpRouter_GithubStatic 30000000 56.5 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_GithubStatic 20000000 66.5 ns/op 0 B/op 0 allocs/op +BenchmarkIris_GithubStatic 30000000 48.5 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GithubStatic 20000000 76.2 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_GithubStatic 20000000 109 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GithubStatic 1000000 2751 ns/op 752 B/op 8 allocs/op +BenchmarkMartini_GithubStatic 100000 15170 ns/op 784 B/op 10 allocs/op +BenchmarkPat_GithubStatic 100000 12500 ns/op 3648 B/op 76 allocs/op +BenchmarkPossum_GithubStatic 1000000 1338 ns/op 416 B/op 3 allocs/op +BenchmarkR2router_GithubStatic 2000000 672 ns/op 144 B/op 4 allocs/op +BenchmarkRevel_GithubStatic 500000 4906 ns/op 1248 B/op 23 allocs/op +BenchmarkRivet_GithubStatic 10000000 121 ns/op 0 B/op 0 allocs/op +BenchmarkTango_GithubStatic 1000000 1620 ns/op 256 B/op 9 allocs/op +BenchmarkTigerTonic_GithubStatic 5000000 350 ns/op 48 B/op 1 allocs/op +BenchmarkTraffic_GithubStatic 30000 55736 ns/op 18904 B/op 148 allocs/op +BenchmarkVulcan_GithubStatic 1000000 1266 ns/op 98 B/op 3 allocs/op +BenchmarkAce_GithubParam 2000000 584 ns/op 96 B/op 1 allocs/op +BenchmarkBear_GithubParam 1000000 1628 ns/op 496 B/op 5 allocs/op +BenchmarkBeego_GithubParam 1000000 1667 ns/op 192 B/op 4 allocs/op +BenchmarkBone_GithubParam 300000 6553 ns/op 1456 B/op 16 allocs/op +BenchmarkDenco_GithubParam 3000000 525 ns/op 128 B/op 1 allocs/op +BenchmarkEcho_GithubParam 10000000 186 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GithubParam 10000000 184 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GithubParam 1000000 2264 ns/op 712 B/op 9 allocs/op +BenchmarkGoji_GithubParam 1000000 1355 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_GithubParam 1000000 1707 ns/op 256 B/op 7 allocs/op +BenchmarkGoJsonRest_GithubParam 1000000 2794 ns/op 713 B/op 14 allocs/op +BenchmarkGoRestful_GithubParam 10000 134707 ns/op 3016 B/op 31 allocs/op +BenchmarkGorillaMux_GithubParam 200000 11270 ns/op 768 B/op 8 allocs/op +BenchmarkHttpRouter_GithubParam 5000000 367 ns/op 96 B/op 1 allocs/op +BenchmarkHttpTreeMux_GithubParam 1000000 1198 ns/op 384 B/op 4 allocs/op +BenchmarkIris_GithubParam 30000000 49.3 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GithubParam 2000000 872 ns/op 128 B/op 5 allocs/op +BenchmarkLARS_GithubParam 10000000 189 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GithubParam 1000000 3210 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_GithubParam 200000 13075 ns/op 1136 B/op 11 allocs/op +BenchmarkPat_GithubParam 200000 8415 ns/op 2464 B/op 48 allocs/op +BenchmarkPossum_GithubParam 1000000 1893 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_GithubParam 1000000 1271 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_GithubParam 200000 6570 ns/op 1744 B/op 28 allocs/op +BenchmarkRivet_GithubParam 3000000 554 ns/op 96 B/op 1 allocs/op +BenchmarkTango_GithubParam 1000000 2423 ns/op 480 B/op 12 allocs/op +BenchmarkTigerTonic_GithubParam 300000 6103 ns/op 1408 B/op 22 allocs/op +BenchmarkTraffic_GithubParam 100000 20411 ns/op 5992 B/op 52 allocs/op +BenchmarkVulcan_GithubParam 1000000 1848 ns/op 98 B/op 3 allocs/op +BenchmarkAce_GithubAll 10000 121206 ns/op 13792 B/op 167 allocs/op +BenchmarkBear_GithubAll 10000 348919 ns/op 86448 B/op 943 allocs/op +BenchmarkBeego_GithubAll 5000 296816 ns/op 16608 B/op 524 allocs/op +BenchmarkBone_GithubAll 500 2502143 ns/op 548736 B/op 7241 allocs/op +BenchmarkDenco_GithubAll 20000 99705 ns/op 20224 B/op 167 allocs/op +BenchmarkEcho_GithubAll 30000 45469 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GithubAll 50000 39402 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GithubAll 5000 446025 ns/op 131656 B/op 1686 allocs/op +BenchmarkGoji_GithubAll 3000 547698 ns/op 56112 B/op 334 allocs/op +BenchmarkGojiv2_GithubAll 2000 763043 ns/op 118864 B/op 3103 allocs/op +BenchmarkGoJsonRest_GithubAll 5000 538030 ns/op 134371 B/op 2737 allocs/op +BenchmarkGoRestful_GithubAll 100 14870850 ns/op 837832 B/op 6913 allocs/op +BenchmarkGorillaMux_GithubAll 200 6690383 ns/op 144464 B/op 1588 allocs/op +BenchmarkHttpRouter_GithubAll 20000 65653 ns/op 13792 B/op 167 allocs/op +BenchmarkHttpTreeMux_GithubAll 10000 215312 ns/op 65856 B/op 671 allocs/op +BenchmarkIris_GithubAll 100000 20731 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GithubAll 10000 167209 ns/op 23304 B/op 843 allocs/op +BenchmarkLARS_GithubAll 30000 41069 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GithubAll 2000 665038 ns/op 201138 B/op 1803 allocs/op +BenchmarkMartini_GithubAll 300 5433644 ns/op 228213 B/op 2483 allocs/op +BenchmarkPat_GithubAll 300 4210240 ns/op 1499569 B/op 27435 allocs/op +BenchmarkPossum_GithubAll 10000 255114 ns/op 84448 B/op 609 allocs/op +BenchmarkR2router_GithubAll 10000 237113 ns/op 77328 B/op 979 allocs/op +BenchmarkRevel_GithubAll 2000 1150565 ns/op 337424 B/op 5512 allocs/op +BenchmarkRivet_GithubAll 20000 96555 ns/op 16272 B/op 167 allocs/op +BenchmarkTango_GithubAll 5000 417423 ns/op 87075 B/op 2267 allocs/op +BenchmarkTigerTonic_GithubAll 2000 994556 ns/op 233680 B/op 5035 allocs/op +BenchmarkTraffic_GithubAll 200 7770444 ns/op 2659331 B/op 21848 allocs/op +BenchmarkVulcan_GithubAll 5000 292216 ns/op 19894 B/op 609 allocs/op +BenchmarkAce_GPlusStatic 10000000 198 ns/op 0 B/op 0 allocs/op +BenchmarkBear_GPlusStatic 3000000 431 ns/op 104 B/op 3 allocs/op +BenchmarkBeego_GPlusStatic 2000000 943 ns/op 32 B/op 4 allocs/op +BenchmarkBone_GPlusStatic 10000000 204 ns/op 32 B/op 1 allocs/op +BenchmarkDenco_GPlusStatic 50000000 31.5 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_GPlusStatic 20000000 90.1 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlusStatic 20000000 88.8 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlusStatic 2000000 897 ns/op 280 B/op 5 allocs/op +BenchmarkGoji_GPlusStatic 10000000 201 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_GPlusStatic 2000000 626 ns/op 160 B/op 4 allocs/op +BenchmarkGoJsonRest_GPlusStatic 1000000 1163 ns/op 329 B/op 11 allocs/op +BenchmarkGoRestful_GPlusStatic 200000 7915 ns/op 2360 B/op 26 allocs/op +BenchmarkGorillaMux_GPlusStatic 1000000 1892 ns/op 448 B/op 7 allocs/op +BenchmarkHttpRouter_GPlusStatic 50000000 33.7 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_GPlusStatic 30000000 42.3 ns/op 0 B/op 0 allocs/op +BenchmarkIris_GPlusStatic 30000000 51.9 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlusStatic 30000000 58.5 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_GPlusStatic 20000000 88.5 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlusStatic 1000000 2237 ns/op 752 B/op 8 allocs/op +BenchmarkMartini_GPlusStatic 500000 3892 ns/op 784 B/op 10 allocs/op +BenchmarkPat_GPlusStatic 5000000 336 ns/op 96 B/op 2 allocs/op +BenchmarkPossum_GPlusStatic 1000000 1188 ns/op 416 B/op 3 allocs/op +BenchmarkR2router_GPlusStatic 3000000 560 ns/op 144 B/op 4 allocs/op +BenchmarkRevel_GPlusStatic 500000 4448 ns/op 1232 B/op 23 allocs/op +BenchmarkRivet_GPlusStatic 20000000 80.3 ns/op 0 B/op 0 allocs/op +BenchmarkTango_GPlusStatic 1000000 1153 ns/op 208 B/op 9 allocs/op +BenchmarkTigerTonic_GPlusStatic 10000000 223 ns/op 32 B/op 1 allocs/op +BenchmarkTraffic_GPlusStatic 1000000 2782 ns/op 1192 B/op 15 allocs/op +BenchmarkVulcan_GPlusStatic 2000000 752 ns/op 98 B/op 3 allocs/op +BenchmarkAce_GPlusParam 3000000 423 ns/op 64 B/op 1 allocs/op +BenchmarkBear_GPlusParam 1000000 1094 ns/op 480 B/op 5 allocs/op +BenchmarkBeego_GPlusParam 1000000 1317 ns/op 128 B/op 4 allocs/op +BenchmarkBone_GPlusParam 1000000 1063 ns/op 384 B/op 3 allocs/op +BenchmarkDenco_GPlusParam 5000000 314 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_GPlusParam 20000000 120 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlusParam 20000000 116 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlusParam 1000000 1728 ns/op 648 B/op 8 allocs/op +BenchmarkGoji_GPlusParam 2000000 859 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_GPlusParam 2000000 935 ns/op 176 B/op 5 allocs/op +BenchmarkGoJsonRest_GPlusParam 1000000 1961 ns/op 649 B/op 13 allocs/op +BenchmarkGoRestful_GPlusParam 100000 15490 ns/op 2760 B/op 29 allocs/op +BenchmarkGorillaMux_GPlusParam 500000 3954 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_GPlusParam 10000000 236 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_GPlusParam 2000000 821 ns/op 352 B/op 3 allocs/op +BenchmarkIris_GPlusParam 30000000 53.7 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlusParam 3000000 433 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_GPlusParam 10000000 121 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlusParam 1000000 3153 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_GPlusParam 300000 5510 ns/op 1104 B/op 11 allocs/op +BenchmarkPat_GPlusParam 1000000 2166 ns/op 688 B/op 12 allocs/op +BenchmarkPossum_GPlusParam 1000000 1797 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_GPlusParam 1000000 1107 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_GPlusParam 500000 5534 ns/op 1664 B/op 26 allocs/op +BenchmarkRivet_GPlusParam 5000000 304 ns/op 48 B/op 1 allocs/op +BenchmarkTango_GPlusParam 1000000 1541 ns/op 272 B/op 9 allocs/op +BenchmarkTigerTonic_GPlusParam 500000 3604 ns/op 1040 B/op 16 allocs/op +BenchmarkTraffic_GPlusParam 500000 5780 ns/op 1976 B/op 21 allocs/op +BenchmarkVulcan_GPlusParam 1000000 1066 ns/op 98 B/op 3 allocs/op +BenchmarkAce_GPlus2Params 3000000 465 ns/op 64 B/op 1 allocs/op +BenchmarkBear_GPlus2Params 1000000 1410 ns/op 496 B/op 5 allocs/op +BenchmarkBeego_GPlus2Params 1000000 1753 ns/op 256 B/op 4 allocs/op +BenchmarkBone_GPlus2Params 1000000 2846 ns/op 736 B/op 7 allocs/op +BenchmarkDenco_GPlus2Params 5000000 407 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_GPlus2Params 10000000 166 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlus2Params 10000000 148 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlus2Params 1000000 2112 ns/op 712 B/op 9 allocs/op +BenchmarkGoji_GPlus2Params 1000000 1202 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_GPlus2Params 1000000 1796 ns/op 256 B/op 8 allocs/op +BenchmarkGoJsonRest_GPlus2Params 1000000 2628 ns/op 713 B/op 14 allocs/op +BenchmarkGoRestful_GPlus2Params 100000 18971 ns/op 2920 B/op 31 allocs/op +BenchmarkGorillaMux_GPlus2Params 200000 8545 ns/op 768 B/op 8 allocs/op +BenchmarkHttpRouter_GPlus2Params 5000000 269 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_GPlus2Params 1000000 1108 ns/op 384 B/op 4 allocs/op +BenchmarkIris_GPlus2Params 30000000 53.3 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlus2Params 2000000 818 ns/op 128 B/op 5 allocs/op +BenchmarkLARS_GPlus2Params 10000000 149 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlus2Params 1000000 2937 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_GPlus2Params 200000 13015 ns/op 1232 B/op 15 allocs/op +BenchmarkPat_GPlus2Params 200000 6500 ns/op 2256 B/op 34 allocs/op +BenchmarkPossum_GPlus2Params 1000000 1681 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_GPlus2Params 1000000 1162 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_GPlus2Params 500000 5910 ns/op 1760 B/op 28 allocs/op +BenchmarkRivet_GPlus2Params 5000000 411 ns/op 96 B/op 1 allocs/op +BenchmarkTango_GPlus2Params 1000000 1874 ns/op 448 B/op 11 allocs/op +BenchmarkTigerTonic_GPlus2Params 500000 5584 ns/op 1456 B/op 22 allocs/op +BenchmarkTraffic_GPlus2Params 200000 12500 ns/op 3272 B/op 31 allocs/op +BenchmarkVulcan_GPlus2Params 1000000 1486 ns/op 98 B/op 3 allocs/op +BenchmarkAce_GPlusAll 300000 5583 ns/op 640 B/op 11 allocs/op +BenchmarkBear_GPlusAll 100000 15530 ns/op 5488 B/op 61 allocs/op +BenchmarkBeego_GPlusAll 100000 17470 ns/op 1440 B/op 44 allocs/op +BenchmarkBone_GPlusAll 100000 19361 ns/op 4912 B/op 61 allocs/op +BenchmarkDenco_GPlusAll 500000 4558 ns/op 672 B/op 11 allocs/op +BenchmarkEcho_GPlusAll 1000000 2290 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlusAll 1000000 1951 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlusAll 100000 23171 ns/op 8040 B/op 103 allocs/op +BenchmarkGoji_GPlusAll 200000 12025 ns/op 3696 B/op 22 allocs/op +BenchmarkGojiv2_GPlusAll 100000 15520 ns/op 2640 B/op 76 allocs/op +BenchmarkGoJsonRest_GPlusAll 50000 28341 ns/op 8117 B/op 170 allocs/op +BenchmarkGoRestful_GPlusAll 10000 168209 ns/op 38664 B/op 389 allocs/op +BenchmarkGorillaMux_GPlusAll 20000 63253 ns/op 9248 B/op 102 allocs/op +BenchmarkHttpRouter_GPlusAll 500000 3066 ns/op 640 B/op 11 allocs/op +BenchmarkHttpTreeMux_GPlusAll 200000 10690 ns/op 4032 B/op 38 allocs/op +BenchmarkIris_GPlusAll 1000000 1155 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlusAll 200000 7400 ns/op 976 B/op 43 allocs/op +BenchmarkLARS_GPlusAll 1000000 2024 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlusAll 50000 36762 ns/op 12944 B/op 115 allocs/op +BenchmarkMartini_GPlusAll 20000 88555 ns/op 14448 B/op 165 allocs/op +BenchmarkPat_GPlusAll 30000 48602 ns/op 16576 B/op 298 allocs/op +BenchmarkPossum_GPlusAll 100000 15940 ns/op 5408 B/op 39 allocs/op +BenchmarkR2router_GPlusAll 100000 13560 ns/op 5040 B/op 63 allocs/op +BenchmarkRevel_GPlusAll 20000 71154 ns/op 21136 B/op 342 allocs/op +BenchmarkRivet_GPlusAll 300000 4613 ns/op 768 B/op 11 allocs/op +BenchmarkTango_GPlusAll 100000 21081 ns/op 4304 B/op 129 allocs/op +BenchmarkTigerTonic_GPlusAll 30000 55203 ns/op 14256 B/op 272 allocs/op +BenchmarkTraffic_GPlusAll 10000 108306 ns/op 37360 B/op 392 allocs/op +BenchmarkVulcan_GPlusAll 100000 15290 ns/op 1274 B/op 39 allocs/op +BenchmarkAce_ParseStatic 10000000 199 ns/op 0 B/op 0 allocs/op +BenchmarkBear_ParseStatic 3000000 497 ns/op 120 B/op 3 allocs/op +BenchmarkBeego_ParseStatic 1000000 1010 ns/op 32 B/op 4 allocs/op +BenchmarkBone_ParseStatic 2000000 685 ns/op 144 B/op 3 allocs/op +BenchmarkDenco_ParseStatic 30000000 47.2 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_ParseStatic 20000000 92.5 ns/op 0 B/op 0 allocs/op +BenchmarkGin_ParseStatic 20000000 91.5 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParseStatic 2000000 944 ns/op 296 B/op 5 allocs/op +BenchmarkGoji_ParseStatic 5000000 251 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_ParseStatic 2000000 638 ns/op 160 B/op 4 allocs/op +BenchmarkGoJsonRest_ParseStatic 1000000 1218 ns/op 329 B/op 11 allocs/op +BenchmarkGoRestful_ParseStatic 200000 12490 ns/op 3656 B/op 30 allocs/op +BenchmarkGorillaMux_ParseStatic 500000 2952 ns/op 448 B/op 7 allocs/op +BenchmarkHttpRouter_ParseStatic 50000000 36.8 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_ParseStatic 20000000 70.8 ns/op 0 B/op 0 allocs/op +BenchmarkIris_ParseStatic 30000000 49.2 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParseStatic 20000000 60.0 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_ParseStatic 20000000 92.9 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParseStatic 1000000 2265 ns/op 752 B/op 8 allocs/op +BenchmarkMartini_ParseStatic 500000 4386 ns/op 784 B/op 10 allocs/op +BenchmarkPat_ParseStatic 2000000 820 ns/op 240 B/op 5 allocs/op +BenchmarkPossum_ParseStatic 1000000 1178 ns/op 416 B/op 3 allocs/op +BenchmarkR2router_ParseStatic 2000000 608 ns/op 144 B/op 4 allocs/op +BenchmarkRevel_ParseStatic 500000 4662 ns/op 1248 B/op 23 allocs/op +BenchmarkRivet_ParseStatic 20000000 85.7 ns/op 0 B/op 0 allocs/op +BenchmarkTango_ParseStatic 1000000 1284 ns/op 256 B/op 9 allocs/op +BenchmarkTigerTonic_ParseStatic 5000000 306 ns/op 48 B/op 1 allocs/op +BenchmarkTraffic_ParseStatic 500000 4098 ns/op 1816 B/op 20 allocs/op +BenchmarkVulcan_ParseStatic 2000000 832 ns/op 98 B/op 3 allocs/op +BenchmarkAce_ParseParam 5000000 397 ns/op 64 B/op 1 allocs/op +BenchmarkBear_ParseParam 1000000 1084 ns/op 467 B/op 5 allocs/op +BenchmarkBeego_ParseParam 1000000 1171 ns/op 64 B/op 4 allocs/op +BenchmarkBone_ParseParam 1000000 1320 ns/op 464 B/op 4 allocs/op +BenchmarkDenco_ParseParam 5000000 316 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_ParseParam 20000000 106 ns/op 0 B/op 0 allocs/op +BenchmarkGin_ParseParam 20000000 97.3 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParseParam 1000000 1634 ns/op 664 B/op 8 allocs/op +BenchmarkGoji_ParseParam 2000000 928 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_ParseParam 2000000 986 ns/op 208 B/op 6 allocs/op +BenchmarkGoJsonRest_ParseParam 1000000 1816 ns/op 649 B/op 13 allocs/op +BenchmarkGoRestful_ParseParam 100000 13360 ns/op 4024 B/op 31 allocs/op +BenchmarkGorillaMux_ParseParam 500000 3366 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_ParseParam 10000000 225 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_ParseParam 2000000 706 ns/op 352 B/op 3 allocs/op +BenchmarkIris_ParseParam 30000000 50.8 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParseParam 5000000 406 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_ParseParam 20000000 101 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParseParam 1000000 2744 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_ParseParam 300000 5056 ns/op 1104 B/op 11 allocs/op +BenchmarkPat_ParseParam 1000000 2871 ns/op 1120 B/op 17 allocs/op +BenchmarkPossum_ParseParam 1000000 1701 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_ParseParam 1000000 1033 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_ParseParam 500000 5266 ns/op 1664 B/op 26 allocs/op +BenchmarkRivet_ParseParam 5000000 264 ns/op 48 B/op 1 allocs/op +BenchmarkTango_ParseParam 1000000 1387 ns/op 288 B/op 9 allocs/op +BenchmarkTigerTonic_ParseParam 1000000 3236 ns/op 992 B/op 16 allocs/op +BenchmarkTraffic_ParseParam 500000 5372 ns/op 2248 B/op 23 allocs/op +BenchmarkVulcan_ParseParam 2000000 949 ns/op 98 B/op 3 allocs/op +BenchmarkAce_Parse2Params 5000000 421 ns/op 64 B/op 1 allocs/op +BenchmarkBear_Parse2Params 1000000 1250 ns/op 496 B/op 5 allocs/op +BenchmarkBeego_Parse2Params 1000000 1436 ns/op 128 B/op 4 allocs/op +BenchmarkBone_Parse2Params 1000000 1192 ns/op 416 B/op 3 allocs/op +BenchmarkDenco_Parse2Params 5000000 373 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_Parse2Params 10000000 131 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Parse2Params 20000000 118 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Parse2Params 1000000 2030 ns/op 712 B/op 9 allocs/op +BenchmarkGoji_Parse2Params 2000000 946 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_Parse2Params 2000000 954 ns/op 192 B/op 5 allocs/op +BenchmarkGoJsonRest_Parse2Params 1000000 2251 ns/op 713 B/op 14 allocs/op +BenchmarkGoRestful_Parse2Params 100000 22051 ns/op 6856 B/op 39 allocs/op +BenchmarkGorillaMux_Parse2Params 500000 3574 ns/op 768 B/op 8 allocs/op +BenchmarkHttpRouter_Parse2Params 10000000 238 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_Parse2Params 1000000 1007 ns/op 384 B/op 4 allocs/op +BenchmarkIris_Parse2Params 30000000 52.0 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_Parse2Params 2000000 747 ns/op 128 B/op 5 allocs/op +BenchmarkLARS_Parse2Params 20000000 119 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Parse2Params 1000000 2984 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_Parse2Params 300000 4966 ns/op 1136 B/op 11 allocs/op +BenchmarkPat_Parse2Params 1000000 2879 ns/op 832 B/op 17 allocs/op +BenchmarkPossum_Parse2Params 1000000 1703 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Parse2Params 1000000 1187 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_Parse2Params 300000 5790 ns/op 1728 B/op 28 allocs/op +BenchmarkRivet_Parse2Params 5000000 395 ns/op 96 B/op 1 allocs/op +BenchmarkTango_Parse2Params 1000000 1832 ns/op 416 B/op 11 allocs/op +BenchmarkTigerTonic_Parse2Params 500000 5286 ns/op 1376 B/op 22 allocs/op +BenchmarkTraffic_Parse2Params 300000 5793 ns/op 2040 B/op 22 allocs/op +BenchmarkVulcan_Parse2Params 1000000 1059 ns/op 98 B/op 3 allocs/op +BenchmarkAce_ParseAll 200000 9285 ns/op 640 B/op 16 allocs/op +BenchmarkBear_ParseAll 50000 27281 ns/op 8928 B/op 110 allocs/op +BenchmarkBeego_ParseAll 100000 23191 ns/op 800 B/op 36 allocs/op +BenchmarkBone_ParseAll 50000 29121 ns/op 8048 B/op 90 allocs/op +BenchmarkDenco_ParseAll 300000 6850 ns/op 928 B/op 16 allocs/op +BenchmarkEcho_ParseAll 300000 4143 ns/op 0 B/op 0 allocs/op +BenchmarkGin_ParseAll 500000 3680 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParseAll 30000 41269 ns/op 13728 B/op 181 allocs/op +BenchmarkGoji_ParseAll 100000 19371 ns/op 5376 B/op 32 allocs/op +BenchmarkGojiv2_ParseAll 100000 22791 ns/op 4496 B/op 121 allocs/op +BenchmarkGoJsonRest_ParseAll 30000 48336 ns/op 13866 B/op 321 allocs/op +BenchmarkGoRestful_ParseAll 5000 447025 ns/op 125600 B/op 868 allocs/op +BenchmarkGorillaMux_ParseAll 10000 126807 ns/op 16560 B/op 198 allocs/op +BenchmarkHttpRouter_ParseAll 500000 4346 ns/op 640 B/op 16 allocs/op +BenchmarkHttpTreeMux_ParseAll 100000 15080 ns/op 5728 B/op 51 allocs/op +BenchmarkIris_ParseAll 1000000 2233 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParseAll 200000 10095 ns/op 1112 B/op 54 allocs/op +BenchmarkLARS_ParseAll 500000 3672 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParseAll 20000 72204 ns/op 24160 B/op 224 allocs/op +BenchmarkMartini_ParseAll 10000 134707 ns/op 25600 B/op 276 allocs/op +BenchmarkPat_ParseAll 30000 55703 ns/op 17264 B/op 343 allocs/op +BenchmarkPossum_ParseAll 50000 31801 ns/op 10816 B/op 78 allocs/op +BenchmarkR2router_ParseAll 100000 25061 ns/op 8352 B/op 120 allocs/op +BenchmarkRevel_ParseAll 10000 132607 ns/op 39424 B/op 652 allocs/op +BenchmarkRivet_ParseAll 300000 6797 ns/op 912 B/op 16 allocs/op +BenchmarkTango_ParseAll 50000 38662 ns/op 7664 B/op 240 allocs/op +BenchmarkTigerTonic_ParseAll 20000 72554 ns/op 19424 B/op 360 allocs/op +BenchmarkTraffic_ParseAll 10000 147408 ns/op 57776 B/op 642 allocs/op +BenchmarkVulcan_ParseAll 50000 28641 ns/op 2548 B/op 78 allocs/op +BenchmarkAce_StaticAll 30000 45069 ns/op 0 B/op 0 allocs/op +BenchmarkHttpServeMux_StaticAll 2000 749542 ns/op 96 B/op 8 allocs/op +BenchmarkBeego_StaticAll 10000 229913 ns/op 15744 B/op 628 allocs/op +BenchmarkBear_StaticAll 10000 102805 ns/op 20336 B/op 461 allocs/op +BenchmarkBone_StaticAll 20000 74654 ns/op 0 B/op 0 allocs/op +BenchmarkDenco_StaticAll 100000 12750 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_StaticAll 50000 29521 ns/op 0 B/op 0 allocs/op +BenchmarkGin_StaticAll 50000 27861 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_StaticAll 10000 165709 ns/op 46440 B/op 785 allocs/op +BenchmarkGoji_StaticAll 20000 60603 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_StaticAll 10000 155908 ns/op 25120 B/op 628 allocs/op +BenchmarkGoJsonRest_StaticAll 10000 246314 ns/op 51653 B/op 1727 allocs/op +BenchmarkGoRestful_StaticAll 300 5300303 ns/op 392312 B/op 4694 allocs/op +BenchmarkGorillaMux_StaticAll 1000 2013115 ns/op 70432 B/op 1107 allocs/op +BenchmarkHttpRouter_StaticAll 100000 16890 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_StaticAll 100000 16830 ns/op 0 B/op 0 allocs/op +BenchmarkIris_StaticAll 100000 15580 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_StaticAll 100000 23181 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_StaticAll 50000 27121 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_StaticAll 5000 374421 ns/op 118065 B/op 1256 allocs/op +BenchmarkMartini_StaticAll 500 2550146 ns/op 132818 B/op 2178 allocs/op +BenchmarkPat_StaticAll 1000 1524087 ns/op 533904 B/op 11123 allocs/op +BenchmarkPossum_StaticAll 10000 183510 ns/op 65312 B/op 471 allocs/op +BenchmarkR2router_StaticAll 10000 114406 ns/op 22608 B/op 628 allocs/op +BenchmarkRevel_StaticAll 3000 698039 ns/op 198240 B/op 3611 allocs/op +BenchmarkRivet_StaticAll 50000 32081 ns/op 0 B/op 0 allocs/op +BenchmarkTango_StaticAll 10000 268015 ns/op 40481 B/op 1413 allocs/op +BenchmarkTigerTonic_StaticAll 20000 63353 ns/op 7504 B/op 157 allocs/op +BenchmarkTraffic_StaticAll 1000 1976113 ns/op 729736 B/op 14287 allocs/op +BenchmarkVulcan_StaticAll 10000 198611 ns/op 15386 B/op 471 allocs/op +ok github.com/kataras/go-http-routing-benchmark 972.432s + +D:\Projects\Golang\mygopath\src\github.com\kataras\go-http-routing-benchmark> +``` \ No newline at end of file diff --git a/github_test.go b/github_test.go index bb3f379e..e085d217 100644 --- a/github_test.go +++ b/github_test.go @@ -289,6 +289,7 @@ var ( githubGorillaMux http.Handler githubHttpRouter http.Handler githubHttpTreeMux http.Handler + githubIris http.Handler githubKocha http.Handler githubLARS http.Handler githubMacaron http.Handler @@ -353,6 +354,9 @@ func init() { calcMem("HttpTreeMux", func() { githubHttpTreeMux = loadHttpTreeMux(githubAPI) }) + calcMem("Iris", func() { + githubIris = loadIris(githubAPI) + }) calcMem("Kocha", func() { githubKocha = loadKocha(githubAPI) }) @@ -460,6 +464,10 @@ func BenchmarkHttpTreeMux_GithubStatic(b *testing.B) { req, _ := http.NewRequest("GET", "/user/repos", nil) benchRequest(b, githubHttpTreeMux, req) } +func BenchmarkIris_GithubStatic(b *testing.B) { + req, _ := http.NewRequest("GET", "/user/repos", nil) + benchRequest(b, githubIris, req) +} func BenchmarkKocha_GithubStatic(b *testing.B) { req, _ := http.NewRequest("GET", "/user/repos", nil) benchRequest(b, githubKocha, req) @@ -579,6 +587,10 @@ func BenchmarkHttpTreeMux_GithubParam(b *testing.B) { req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil) benchRequest(b, githubHttpTreeMux, req) } +func BenchmarkIris_GithubParam(b *testing.B) { + req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil) + benchRequest(b, githubIris, req) +} func BenchmarkKocha_GithubParam(b *testing.B) { req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil) benchRequest(b, githubKocha, req) @@ -683,6 +695,9 @@ func BenchmarkHttpRouter_GithubAll(b *testing.B) { func BenchmarkHttpTreeMux_GithubAll(b *testing.B) { benchRoutes(b, githubHttpTreeMux, githubAPI) } +func BenchmarkIris_GithubAll(b *testing.B) { + benchRoutes(b, githubIris, githubAPI) +} func BenchmarkKocha_GithubAll(b *testing.B) { benchRoutes(b, githubKocha, githubAPI) } diff --git a/githuball.md b/githuball.md new file mode 100644 index 00000000..8919abc5 --- /dev/null +++ b/githuball.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_GithubAll 10000 121206 ns/op 13792 B/op 167 allocs/op +BenchmarkBear_GithubAll 10000 348919 ns/op 86448 B/op 943 allocs/op +BenchmarkBeego_GithubAll 5000 296816 ns/op 16608 B/op 524 allocs/op +BenchmarkBone_GithubAll 500 2502143 ns/op 548736 B/op 7241 allocs/op +BenchmarkDenco_GithubAll 20000 99705 ns/op 20224 B/op 167 allocs/op +BenchmarkEcho_GithubAll 30000 45469 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GithubAll 50000 39402 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GithubAll 5000 446025 ns/op 131656 B/op 1686 allocs/op +BenchmarkGoji_GithubAll 3000 547698 ns/op 56112 B/op 334 allocs/op +BenchmarkGojiv2_GithubAll 2000 763043 ns/op 118864 B/op 3103 allocs/op +BenchmarkGoJsonRest_GithubAll 5000 538030 ns/op 134371 B/op 2737 allocs/op +BenchmarkGoRestful_GithubAll 100 14870850 ns/op 837832 B/op 6913 allocs/op +BenchmarkGorillaMux_GithubAll 200 6690383 ns/op 144464 B/op 1588 allocs/op +BenchmarkHttpRouter_GithubAll 20000 65653 ns/op 13792 B/op 167 allocs/op +BenchmarkHttpTreeMux_GithubAll 10000 215312 ns/op 65856 B/op 671 allocs/op +BenchmarkIris_GithubAll 100000 20731 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GithubAll 10000 167209 ns/op 23304 B/op 843 allocs/op +BenchmarkLARS_GithubAll 30000 41069 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GithubAll 2000 665038 ns/op 201138 B/op 1803 allocs/op +BenchmarkMartini_GithubAll 300 5433644 ns/op 228213 B/op 2483 allocs/op +BenchmarkPat_GithubAll 300 4210240 ns/op 1499569 B/op 27435 allocs/op +BenchmarkPossum_GithubAll 10000 255114 ns/op 84448 B/op 609 allocs/op +BenchmarkR2router_GithubAll 10000 237113 ns/op 77328 B/op 979 allocs/op +BenchmarkRevel_GithubAll 2000 1150565 ns/op 337424 B/op 5512 allocs/op +BenchmarkRivet_GithubAll 20000 96555 ns/op 16272 B/op 167 allocs/op +BenchmarkTango_GithubAll 5000 417423 ns/op 87075 B/op 2267 allocs/op +BenchmarkTigerTonic_GithubAll 2000 994556 ns/op 233680 B/op 5035 allocs/op +BenchmarkTraffic_GithubAll 200 7770444 ns/op 2659331 B/op 21848 allocs/op +BenchmarkVulcan_GithubAll 5000 292216 ns/op 19894 B/op 609 allocs/op +``` diff --git a/githubparam.md b/githubparam.md new file mode 100644 index 00000000..75d2ad7d --- /dev/null +++ b/githubparam.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_GithubParam 2000000 584 ns/op 96 B/op 1 allocs/op +BenchmarkBear_GithubParam 1000000 1628 ns/op 496 B/op 5 allocs/op +BenchmarkBeego_GithubParam 1000000 1667 ns/op 192 B/op 4 allocs/op +BenchmarkBone_GithubParam 300000 6553 ns/op 1456 B/op 16 allocs/op +BenchmarkDenco_GithubParam 3000000 525 ns/op 128 B/op 1 allocs/op +BenchmarkEcho_GithubParam 10000000 186 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GithubParam 10000000 184 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GithubParam 1000000 2264 ns/op 712 B/op 9 allocs/op +BenchmarkGoji_GithubParam 1000000 1355 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_GithubParam 1000000 1707 ns/op 256 B/op 7 allocs/op +BenchmarkGoJsonRest_GithubParam 1000000 2794 ns/op 713 B/op 14 allocs/op +BenchmarkGoRestful_GithubParam 10000 134707 ns/op 3016 B/op 31 allocs/op +BenchmarkGorillaMux_GithubParam 200000 11270 ns/op 768 B/op 8 allocs/op +BenchmarkHttpRouter_GithubParam 5000000 367 ns/op 96 B/op 1 allocs/op +BenchmarkHttpTreeMux_GithubParam 1000000 1198 ns/op 384 B/op 4 allocs/op +BenchmarkIris_GithubParam 30000000 49.3 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GithubParam 2000000 872 ns/op 128 B/op 5 allocs/op +BenchmarkLARS_GithubParam 10000000 189 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GithubParam 1000000 3210 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_GithubParam 200000 13075 ns/op 1136 B/op 11 allocs/op +BenchmarkPat_GithubParam 200000 8415 ns/op 2464 B/op 48 allocs/op +BenchmarkPossum_GithubParam 1000000 1893 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_GithubParam 1000000 1271 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_GithubParam 200000 6570 ns/op 1744 B/op 28 allocs/op +BenchmarkRivet_GithubParam 3000000 554 ns/op 96 B/op 1 allocs/op +BenchmarkTango_GithubParam 1000000 2423 ns/op 480 B/op 12 allocs/op +BenchmarkTigerTonic_GithubParam 300000 6103 ns/op 1408 B/op 22 allocs/op +BenchmarkTraffic_GithubParam 100000 20411 ns/op 5992 B/op 52 allocs/op +BenchmarkVulcan_GithubParam 1000000 1848 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/githubstatic.md b/githubstatic.md new file mode 100644 index 00000000..258dc56c --- /dev/null +++ b/githubstatic.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_GithubStatic 10000000 223 ns/op 0 B/op 0 allocs/op +BenchmarkBear_GithubStatic 2000000 613 ns/op 120 B/op 3 allocs/op +BenchmarkBeego_GithubStatic 1000000 1173 ns/op 64 B/op 4 allocs/op +BenchmarkBone_GithubStatic 100000 14740 ns/op 2880 B/op 60 allocs/op +BenchmarkDenco_GithubStatic 30000000 46.8 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_GithubStatic 20000000 111 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GithubStatic 20000000 114 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GithubStatic 1000000 1140 ns/op 296 B/op 5 allocs/op +BenchmarkGoji_GithubStatic 5000000 260 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_GithubStatic 2000000 810 ns/op 160 B/op 4 allocs/op +BenchmarkGoRestful_GithubStatic 30000 43835 ns/op 3720 B/op 32 allocs/op +BenchmarkGoJsonRest_GithubStatic 1000000 1501 ns/op 329 B/op 11 allocs/op +BenchmarkGorillaMux_GithubStatic 100000 20281 ns/op 448 B/op 7 allocs/op +BenchmarkHttpRouter_GithubStatic 30000000 56.5 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_GithubStatic 20000000 66.5 ns/op 0 B/op 0 allocs/op +BenchmarkIris_GithubStatic 30000000 48.5 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GithubStatic 20000000 76.2 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_GithubStatic 20000000 109 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GithubStatic 1000000 2751 ns/op 752 B/op 8 allocs/op +BenchmarkMartini_GithubStatic 100000 15170 ns/op 784 B/op 10 allocs/op +BenchmarkPat_GithubStatic 100000 12500 ns/op 3648 B/op 76 allocs/op +BenchmarkPossum_GithubStatic 1000000 1338 ns/op 416 B/op 3 allocs/op +BenchmarkR2router_GithubStatic 2000000 672 ns/op 144 B/op 4 allocs/op +BenchmarkRevel_GithubStatic 500000 4906 ns/op 1248 B/op 23 allocs/op +BenchmarkRivet_GithubStatic 10000000 121 ns/op 0 B/op 0 allocs/op +BenchmarkTango_GithubStatic 1000000 1620 ns/op 256 B/op 9 allocs/op +BenchmarkTigerTonic_GithubStatic 5000000 350 ns/op 48 B/op 1 allocs/op +BenchmarkTraffic_GithubStatic 30000 55736 ns/op 18904 B/op 148 allocs/op +BenchmarkVulcan_GithubStatic 1000000 1266 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/gplus2params.md b/gplus2params.md new file mode 100644 index 00000000..d423c598 --- /dev/null +++ b/gplus2params.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_GPlus2Params 3000000 465 ns/op 64 B/op 1 allocs/op +BenchmarkBear_GPlus2Params 1000000 1410 ns/op 496 B/op 5 allocs/op +BenchmarkBeego_GPlus2Params 1000000 1753 ns/op 256 B/op 4 allocs/op +BenchmarkBone_GPlus2Params 1000000 2846 ns/op 736 B/op 7 allocs/op +BenchmarkDenco_GPlus2Params 5000000 407 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_GPlus2Params 10000000 166 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlus2Params 10000000 148 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlus2Params 1000000 2112 ns/op 712 B/op 9 allocs/op +BenchmarkGoji_GPlus2Params 1000000 1202 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_GPlus2Params 1000000 1796 ns/op 256 B/op 8 allocs/op +BenchmarkGoJsonRest_GPlus2Params 1000000 2628 ns/op 713 B/op 14 allocs/op +BenchmarkGoRestful_GPlus2Params 100000 18971 ns/op 2920 B/op 31 allocs/op +BenchmarkGorillaMux_GPlus2Params 200000 8545 ns/op 768 B/op 8 allocs/op +BenchmarkHttpRouter_GPlus2Params 5000000 269 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_GPlus2Params 1000000 1108 ns/op 384 B/op 4 allocs/op +BenchmarkIris_GPlus2Params 30000000 53.3 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlus2Params 2000000 818 ns/op 128 B/op 5 allocs/op +BenchmarkLARS_GPlus2Params 10000000 149 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlus2Params 1000000 2937 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_GPlus2Params 200000 13015 ns/op 1232 B/op 15 allocs/op +BenchmarkPat_GPlus2Params 200000 6500 ns/op 2256 B/op 34 allocs/op +BenchmarkPossum_GPlus2Params 1000000 1681 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_GPlus2Params 1000000 1162 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_GPlus2Params 500000 5910 ns/op 1760 B/op 28 allocs/op +BenchmarkRivet_GPlus2Params 5000000 411 ns/op 96 B/op 1 allocs/op +BenchmarkTango_GPlus2Params 1000000 1874 ns/op 448 B/op 11 allocs/op +BenchmarkTigerTonic_GPlus2Params 500000 5584 ns/op 1456 B/op 22 allocs/op +BenchmarkTraffic_GPlus2Params 200000 12500 ns/op 3272 B/op 31 allocs/op +BenchmarkVulcan_GPlus2Params 1000000 1486 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/gplus_test.go b/gplus_test.go index 85344207..aa3ef52d 100644 --- a/gplus_test.go +++ b/gplus_test.go @@ -51,6 +51,7 @@ var ( gplusGorillaMux http.Handler gplusHttpRouter http.Handler gplusHttpTreeMux http.Handler + gplusIris http.Handler gplusKocha http.Handler gplusLARS http.Handler gplusMacaron http.Handler @@ -115,6 +116,9 @@ func init() { calcMem("HttpTreeMux", func() { gplusHttpTreeMux = loadHttpTreeMux(gplusAPI) }) + calcMem("Iris", func() { + gplusIris = loadIris(gplusAPI) + }) calcMem("Kocha", func() { gplusKocha = loadKocha(gplusAPI) }) @@ -222,6 +226,10 @@ func BenchmarkHttpTreeMux_GPlusStatic(b *testing.B) { req, _ := http.NewRequest("GET", "/people", nil) benchRequest(b, gplusHttpTreeMux, req) } +func BenchmarkIris_GPlusStatic(b *testing.B) { + req, _ := http.NewRequest("GET", "/people", nil) + benchRequest(b, gplusIris, req) +} func BenchmarkKocha_GPlusStatic(b *testing.B) { req, _ := http.NewRequest("GET", "/people", nil) benchRequest(b, gplusKocha, req) @@ -341,6 +349,10 @@ func BenchmarkHttpTreeMux_GPlusParam(b *testing.B) { req, _ := http.NewRequest("GET", "/people/118051310819094153327", nil) benchRequest(b, gplusHttpTreeMux, req) } +func BenchmarkIris_GPlusParam(b *testing.B) { + req, _ := http.NewRequest("GET", "/people/118051310819094153327", nil) + benchRequest(b, gplusIris, req) +} func BenchmarkKocha_GPlusParam(b *testing.B) { req, _ := http.NewRequest("GET", "/people/118051310819094153327", nil) benchRequest(b, gplusKocha, req) @@ -460,6 +472,10 @@ func BenchmarkHttpTreeMux_GPlus2Params(b *testing.B) { req, _ := http.NewRequest("GET", "/people/118051310819094153327/activities/123456789", nil) benchRequest(b, gplusHttpTreeMux, req) } +func BenchmarkIris_GPlus2Params(b *testing.B) { + req, _ := http.NewRequest("GET", "/people/118051310819094153327/activities/123456789", nil) + benchRequest(b, gplusIris, req) +} func BenchmarkKocha_GPlus2Params(b *testing.B) { req, _ := http.NewRequest("GET", "/people/118051310819094153327/activities/123456789", nil) benchRequest(b, gplusKocha, req) @@ -564,6 +580,9 @@ func BenchmarkHttpRouter_GPlusAll(b *testing.B) { func BenchmarkHttpTreeMux_GPlusAll(b *testing.B) { benchRoutes(b, gplusHttpTreeMux, gplusAPI) } +func BenchmarkIris_GPlusAll(b *testing.B) { + benchRoutes(b, gplusIris, gplusAPI) +} func BenchmarkKocha_GPlusAll(b *testing.B) { benchRoutes(b, gplusKocha, gplusAPI) } diff --git a/gplusall.md b/gplusall.md new file mode 100644 index 00000000..67eac366 --- /dev/null +++ b/gplusall.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_GPlusAll 300000 5583 ns/op 640 B/op 11 allocs/op +BenchmarkBear_GPlusAll 100000 15530 ns/op 5488 B/op 61 allocs/op +BenchmarkBeego_GPlusAll 100000 17470 ns/op 1440 B/op 44 allocs/op +BenchmarkBone_GPlusAll 100000 19361 ns/op 4912 B/op 61 allocs/op +BenchmarkDenco_GPlusAll 500000 4558 ns/op 672 B/op 11 allocs/op +BenchmarkEcho_GPlusAll 1000000 2290 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlusAll 1000000 1951 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlusAll 100000 23171 ns/op 8040 B/op 103 allocs/op +BenchmarkGoji_GPlusAll 200000 12025 ns/op 3696 B/op 22 allocs/op +BenchmarkGojiv2_GPlusAll 100000 15520 ns/op 2640 B/op 76 allocs/op +BenchmarkGoJsonRest_GPlusAll 50000 28341 ns/op 8117 B/op 170 allocs/op +BenchmarkGoRestful_GPlusAll 10000 168209 ns/op 38664 B/op 389 allocs/op +BenchmarkGorillaMux_GPlusAll 20000 63253 ns/op 9248 B/op 102 allocs/op +BenchmarkHttpRouter_GPlusAll 500000 3066 ns/op 640 B/op 11 allocs/op +BenchmarkHttpTreeMux_GPlusAll 200000 10690 ns/op 4032 B/op 38 allocs/op +BenchmarkIris_GPlusAll 1000000 1155 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlusAll 200000 7400 ns/op 976 B/op 43 allocs/op +BenchmarkLARS_GPlusAll 1000000 2024 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlusAll 50000 36762 ns/op 12944 B/op 115 allocs/op +BenchmarkMartini_GPlusAll 20000 88555 ns/op 14448 B/op 165 allocs/op +BenchmarkPat_GPlusAll 30000 48602 ns/op 16576 B/op 298 allocs/op +BenchmarkPossum_GPlusAll 100000 15940 ns/op 5408 B/op 39 allocs/op +BenchmarkR2router_GPlusAll 100000 13560 ns/op 5040 B/op 63 allocs/op +BenchmarkRevel_GPlusAll 20000 71154 ns/op 21136 B/op 342 allocs/op +BenchmarkRivet_GPlusAll 300000 4613 ns/op 768 B/op 11 allocs/op +BenchmarkTango_GPlusAll 100000 21081 ns/op 4304 B/op 129 allocs/op +BenchmarkTigerTonic_GPlusAll 30000 55203 ns/op 14256 B/op 272 allocs/op +BenchmarkTraffic_GPlusAll 10000 108306 ns/op 37360 B/op 392 allocs/op +BenchmarkVulcan_GPlusAll 100000 15290 ns/op 1274 B/op 39 allocs/op +``` \ No newline at end of file diff --git a/gplusparam.md b/gplusparam.md new file mode 100644 index 00000000..bf3c985a --- /dev/null +++ b/gplusparam.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_GPlusParam 3000000 423 ns/op 64 B/op 1 allocs/op +BenchmarkBear_GPlusParam 1000000 1094 ns/op 480 B/op 5 allocs/op +BenchmarkBeego_GPlusParam 1000000 1317 ns/op 128 B/op 4 allocs/op +BenchmarkBone_GPlusParam 1000000 1063 ns/op 384 B/op 3 allocs/op +BenchmarkDenco_GPlusParam 5000000 314 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_GPlusParam 20000000 120 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlusParam 20000000 116 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlusParam 1000000 1728 ns/op 648 B/op 8 allocs/op +BenchmarkGoji_GPlusParam 2000000 859 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_GPlusParam 2000000 935 ns/op 176 B/op 5 allocs/op +BenchmarkGoJsonRest_GPlusParam 1000000 1961 ns/op 649 B/op 13 allocs/op +BenchmarkGoRestful_GPlusParam 100000 15490 ns/op 2760 B/op 29 allocs/op +BenchmarkGorillaMux_GPlusParam 500000 3954 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_GPlusParam 10000000 236 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_GPlusParam 2000000 821 ns/op 352 B/op 3 allocs/op +BenchmarkIris_GPlusParam 30000000 53.7 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlusParam 3000000 433 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_GPlusParam 10000000 121 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlusParam 1000000 3153 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_GPlusParam 300000 5510 ns/op 1104 B/op 11 allocs/op +BenchmarkPat_GPlusParam 1000000 2166 ns/op 688 B/op 12 allocs/op +BenchmarkPossum_GPlusParam 1000000 1797 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_GPlusParam 1000000 1107 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_GPlusParam 500000 5534 ns/op 1664 B/op 26 allocs/op +BenchmarkRivet_GPlusParam 5000000 304 ns/op 48 B/op 1 allocs/op +BenchmarkTango_GPlusParam 1000000 1541 ns/op 272 B/op 9 allocs/op +BenchmarkTigerTonic_GPlusParam 500000 3604 ns/op 1040 B/op 16 allocs/op +BenchmarkTraffic_GPlusParam 500000 5780 ns/op 1976 B/op 21 allocs/op +BenchmarkVulcan_GPlusParam 1000000 1066 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/gplusstatic.md b/gplusstatic.md new file mode 100644 index 00000000..be8e1586 --- /dev/null +++ b/gplusstatic.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_GPlusStatic 10000000 198 ns/op 0 B/op 0 allocs/op +BenchmarkBear_GPlusStatic 3000000 431 ns/op 104 B/op 3 allocs/op +BenchmarkBeego_GPlusStatic 2000000 943 ns/op 32 B/op 4 allocs/op +BenchmarkBone_GPlusStatic 10000000 204 ns/op 32 B/op 1 allocs/op +BenchmarkDenco_GPlusStatic 50000000 31.5 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_GPlusStatic 20000000 90.1 ns/op 0 B/op 0 allocs/op +BenchmarkGin_GPlusStatic 20000000 88.8 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_GPlusStatic 2000000 897 ns/op 280 B/op 5 allocs/op +BenchmarkGoji_GPlusStatic 10000000 201 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_GPlusStatic 2000000 626 ns/op 160 B/op 4 allocs/op +BenchmarkGoJsonRest_GPlusStatic 1000000 1163 ns/op 329 B/op 11 allocs/op +BenchmarkGoRestful_GPlusStatic 200000 7915 ns/op 2360 B/op 26 allocs/op +BenchmarkGorillaMux_GPlusStatic 1000000 1892 ns/op 448 B/op 7 allocs/op +BenchmarkHttpRouter_GPlusStatic 50000000 33.7 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_GPlusStatic 30000000 42.3 ns/op 0 B/op 0 allocs/op +BenchmarkIris_GPlusStatic 30000000 51.9 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_GPlusStatic 30000000 58.5 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_GPlusStatic 20000000 88.5 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_GPlusStatic 1000000 2237 ns/op 752 B/op 8 allocs/op +BenchmarkMartini_GPlusStatic 500000 3892 ns/op 784 B/op 10 allocs/op +BenchmarkPat_GPlusStatic 5000000 336 ns/op 96 B/op 2 allocs/op +BenchmarkPossum_GPlusStatic 1000000 1188 ns/op 416 B/op 3 allocs/op +BenchmarkR2router_GPlusStatic 3000000 560 ns/op 144 B/op 4 allocs/op +BenchmarkRevel_GPlusStatic 500000 4448 ns/op 1232 B/op 23 allocs/op +BenchmarkRivet_GPlusStatic 20000000 80.3 ns/op 0 B/op 0 allocs/op +BenchmarkTango_GPlusStatic 1000000 1153 ns/op 208 B/op 9 allocs/op +BenchmarkTigerTonic_GPlusStatic 10000000 223 ns/op 32 B/op 1 allocs/op +BenchmarkTraffic_GPlusStatic 1000000 2782 ns/op 1192 B/op 15 allocs/op +BenchmarkVulcan_GPlusStatic 2000000 752 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/images/1.png b/images/1.png new file mode 100644 index 00000000..82aee56c Binary files /dev/null and b/images/1.png differ diff --git a/images/10.png b/images/10.png new file mode 100644 index 00000000..960e92c1 Binary files /dev/null and b/images/10.png differ diff --git a/images/11.png b/images/11.png new file mode 100644 index 00000000..ca25a2f3 Binary files /dev/null and b/images/11.png differ diff --git a/images/12.png b/images/12.png new file mode 100644 index 00000000..3dad7fe8 Binary files /dev/null and b/images/12.png differ diff --git a/images/13.png b/images/13.png new file mode 100644 index 00000000..e39b1463 Binary files /dev/null and b/images/13.png differ diff --git a/images/2.png b/images/2.png new file mode 100644 index 00000000..82202650 Binary files /dev/null and b/images/2.png differ diff --git a/images/3.png b/images/3.png new file mode 100644 index 00000000..a746ed6a Binary files /dev/null and b/images/3.png differ diff --git a/images/4.png b/images/4.png new file mode 100644 index 00000000..94763002 Binary files /dev/null and b/images/4.png differ diff --git a/images/5.png b/images/5.png new file mode 100644 index 00000000..978704bf Binary files /dev/null and b/images/5.png differ diff --git a/images/6.png b/images/6.png new file mode 100644 index 00000000..05a5ab79 Binary files /dev/null and b/images/6.png differ diff --git a/images/7.png b/images/7.png new file mode 100644 index 00000000..ac313ec6 Binary files /dev/null and b/images/7.png differ diff --git a/images/8.png b/images/8.png new file mode 100644 index 00000000..a9bb69ca Binary files /dev/null and b/images/8.png differ diff --git a/images/9.png b/images/9.png new file mode 100644 index 00000000..f1a48a66 Binary files /dev/null and b/images/9.png differ diff --git a/loading.md b/loading.md new file mode 100644 index 00000000..ce901456 --- /dev/null +++ b/loading.md @@ -0,0 +1,127 @@ +``` +D:\Projects\Golang\mygopath\src\github.com\kataras\go-http-routing-benchmark>go test -bench=. -timeout=60m +#GithubAPI Routes: 203 + Ace: 48992 Bytes + Bear: 161704 Bytes + Beego: 144536 Bytes + Bone: 97696 Bytes + Denco: 36728 Bytes + Echo: 76424 Bytes + Gin: 52464 Bytes + GocraftWeb: 95304 Bytes + Goji: 86104 Bytes + Gojiv2: 144408 Bytes + GoJsonRest: 134072 Bytes + GoRestful: 1395560 Bytes + GorillaMux: 1494848 Bytes + HttpRouter: 37464 Bytes + HttpTreeMux: 78736 Bytes + Iris: 62312 Bytes + Kocha: 785120 Bytes + LARS: 49016 Bytes + Macaron: 127304 Bytes + Martini: 556192 Bytes + Pat: 21200 Bytes + Possum: 82928 Bytes + R2router: 47104 Bytes + Revel: 141504 Bytes + Rivet: 42840 Bytes + Tango: 54584 Bytes + TigerTonic: 96032 Bytes + Traffic: 1053776 Bytes + Vulcan: 464976 Bytes + +#GPlusAPI Routes: 13 + Ace: 3600 Bytes + Bear: 7112 Bytes + Beego: 9712 Bytes + Bone: 6448 Bytes + Denco: 3256 Bytes + Echo: 7224 Bytes + Gin: 3856 Bytes + GocraftWeb: 7496 Bytes + Goji: 2912 Bytes + Gojiv2: 7376 Bytes + GoJsonRest: 11416 Bytes + GoRestful: 87608 Bytes + GorillaMux: 71072 Bytes + HttpRouter: 2712 Bytes + HttpTreeMux: 7376 Bytes + Iris: 6480 Bytes + Kocha: 128880 Bytes + LARS: 3624 Bytes + Macaron: 8448 Bytes + Martini: 23936 Bytes + Pat: 1856 Bytes + Possum: 7248 Bytes + R2router: 3928 Bytes + Revel: 10768 Bytes + Rivet: 3064 Bytes + Tango: 4912 Bytes + TigerTonic: 9408 Bytes + Traffic: 49472 Bytes + Vulcan: 25496 Bytes + +#ParseAPI Routes: 26 + Ace: 6592 Bytes + Bear: 12320 Bytes + Beego: 18416 Bytes + Bone: 10992 Bytes + Denco: 4184 Bytes + Echo: 8144 Bytes + Gin: 6816 Bytes + GocraftWeb: 12800 Bytes + Goji: 5232 Bytes + Gojiv2: 14464 Bytes + GoJsonRest: 14088 Bytes + GoRestful: 126216 Bytes + GorillaMux: 122184 Bytes + HttpRouter: 4976 Bytes + HttpTreeMux: 7784 Bytes + Iris: 9928 Bytes + Kocha: 181712 Bytes + LARS: 6616 Bytes + Macaron: 13232 Bytes + Martini: 45952 Bytes + Pat: 2560 Bytes + Possum: 10224 Bytes + R2router: 7056 Bytes + Revel: 15488 Bytes + Rivet: 5680 Bytes + Tango: 8664 Bytes + TigerTonic: 9840 Bytes + Traffic: 93480 Bytes + Vulcan: 44712 Bytes + +#Static Routes: 157 + HttpServeMux: 18784 Bytes + Ace: 30080 Bytes + Bear: 30424 Bytes + Beego: 93768 Bytes + Bone: 37872 Bytes + Denco: 9696 Bytes + Echo: 61120 Bytes + Gin: 30400 Bytes + GocraftWeb: 55464 Bytes + Goji: 27200 Bytes + Gojiv2: 104464 Bytes + GoJsonRest: 135736 Bytes + GoRestful: 908200 Bytes + GorillaMux: 668496 Bytes + HttpRouter: 21128 Bytes + HttpTreeMux: 73384 Bytes + Iris: 37264 Bytes + Kocha: 114816 Bytes + LARS: 30104 Bytes + Macaron: 35136 Bytes + Martini: 308784 Bytes + Pat: 20464 Bytes + Possum: 90848 Bytes + R2router: 23712 Bytes + Revel: 93392 Bytes + Rivet: 23880 Bytes + Tango: 28008 Bytes + TigerTonic: 80320 Bytes + Traffic: 624432 Bytes + Vulcan: 369144 Bytes +``` \ No newline at end of file diff --git a/param.md b/param.md new file mode 100644 index 00000000..938c87e8 --- /dev/null +++ b/param.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_Param 5000000 347 ns/op 32 B/op 1 allocs/op +BenchmarkBear_Param 1000000 1313 ns/op 456 B/op 5 allocs/op +BenchmarkBeego_Param 1000000 1173 ns/op 64 B/op 4 allocs/op +BenchmarkBone_Param 1000000 1255 ns/op 384 B/op 3 allocs/op +BenchmarkDenco_Param 10000000 230 ns/op 32 B/op 1 allocs/op +BenchmarkEcho_Param 20000000 91.8 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Param 20000000 87.0 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Param 1000000 1961 ns/op 648 B/op 8 allocs/op +BenchmarkGoji_Param 2000000 979 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_Param 2000000 837 ns/op 176 B/op 5 allocs/op +BenchmarkGoJsonRest_Param 1000000 2129 ns/op 649 B/op 13 allocs/op +BenchmarkGoRestful_Param 200000 8860 ns/op 2696 B/op 27 allocs/op +BenchmarkGorillaMux_Param 1000000 3152 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_Param 10000000 156 ns/op 32 B/op 1 allocs/op +BenchmarkHttpTreeMux_Param 2000000 901 ns/op 352 B/op 3 allocs/op +BenchmarkIris_Param 30000000 49.7 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_Param 3000000 411 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_Param 20000000 92.3 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Param 1000000 3269 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_Param 500000 5216 ns/op 1104 B/op 11 allocs/op +BenchmarkPat_Param 1000000 2203 ns/op 648 B/op 12 allocs/op +BenchmarkPossum_Param 1000000 1988 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Param 1000000 1235 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_Param 300000 6060 ns/op 1632 B/op 26 allocs/op +BenchmarkRivet_Param 5000000 263 ns/op 48 B/op 1 allocs/op +BenchmarkTango_Param 1000000 1436 ns/op 256 B/op 9 allocs/op +BenchmarkTigerTonic_Param 1000000 3699 ns/op 976 B/op 16 allocs/op +BenchmarkTraffic_Param 300000 5837 ns/op 1960 B/op 21 allocs/op +BenchmarkVulcan_Param 2000000 859 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/param5.md b/param5.md new file mode 100644 index 00000000..7d4ced64 --- /dev/null +++ b/param5.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_Param5 2000000 661 ns/op 160 B/op 1 allocs/op +BenchmarkBear_Param5 1000000 1770 ns/op 501 B/op 5 allocs/op +BenchmarkBeego_Param5 1000000 1668 ns/op 128 B/op 4 allocs/op +BenchmarkBone_Param5 1000000 1687 ns/op 432 B/op 3 allocs/op +BenchmarkDenco_Param5 2000000 636 ns/op 160 B/op 1 allocs/op +BenchmarkEcho_Param5 10000000 163 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Param5 10000000 147 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Param5 1000000 3091 ns/op 920 B/op 11 allocs/op +BenchmarkGoji_Param5 1000000 1294 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_Param5 1000000 1175 ns/op 240 B/op 5 allocs/op +BenchmarkGoJsonRest_Param5 1000000 3989 ns/op 1097 B/op 16 allocs/op +BenchmarkGoRestful_Param5 200000 10665 ns/op 2872 B/op 27 allocs/op +BenchmarkGorillaMux_Param5 500000 4872 ns/op 816 B/op 8 allocs/op +BenchmarkHttpRouter_Param5 3000000 499 ns/op 160 B/op 1 allocs/op +BenchmarkHttpTreeMux_Param5 1000000 2133 ns/op 576 B/op 6 allocs/op +BenchmarkIris_Param5 30000000 49.3 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_Param5 1000000 1917 ns/op 440 B/op 10 allocs/op +BenchmarkLARS_Param5 10000000 155 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Param5 1000000 3742 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_Param5 300000 7177 ns/op 1232 B/op 11 allocs/op +BenchmarkPat_Param5 300000 5273 ns/op 964 B/op 32 allocs/op +BenchmarkPossum_Param5 1000000 2037 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Param5 1000000 1569 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_Param5 200000 7785 ns/op 1984 B/op 33 allocs/op +BenchmarkRivet_Param5 2000000 867 ns/op 240 B/op 1 allocs/op +BenchmarkTango_Param5 1000000 3771 ns/op 944 B/op 17 allocs/op +BenchmarkTigerTonic_Param5 200000 11565 ns/op 2471 B/op 38 allocs/op +BenchmarkTraffic_Param5 200000 8700 ns/op 2248 B/op 25 allocs/op +BenchmarkVulcan_Param5 1000000 1122 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/paramwrite.md b/paramwrite.md new file mode 100644 index 00000000..3579be67 --- /dev/null +++ b/paramwrite.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_ParamWrite 3000000 447 ns/op 40 B/op 2 allocs/op +BenchmarkBear_ParamWrite 1000000 1370 ns/op 456 B/op 5 allocs/op +BenchmarkBeego_ParamWrite 1000000 1298 ns/op 72 B/op 5 allocs/op +BenchmarkBone_ParamWrite 1000000 1347 ns/op 384 B/op 3 allocs/op +BenchmarkDenco_ParamWrite 5000000 289 ns/op 32 B/op 1 allocs/op +BenchmarkEcho_ParamWrite 10000000 204 ns/op 8 B/op 1 allocs/op +BenchmarkGin_ParamWrite 10000000 181 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParamWrite 1000000 2096 ns/op 656 B/op 9 allocs/op +BenchmarkGoji_ParamWrite 1000000 1051 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_ParamWrite 1000000 1118 ns/op 208 B/op 7 allocs/op +BenchmarkGoJsonRest_ParamWrite 1000000 3461 ns/op 1128 B/op 18 allocs/op +BenchmarkGoRestful_ParamWrite 200000 9085 ns/op 2704 B/op 28 allocs/op +BenchmarkGorillaMux_ParamWrite 1000000 3290 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_ParamWrite 10000000 211 ns/op 32 B/op 1 allocs/op +BenchmarkHttpTreeMux_ParamWrite 2000000 967 ns/op 352 B/op 3 allocs/op +BenchmarkIris_ParamWrite 10000000 145 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParamWrite 3000000 476 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_ParamWrite 10000000 174 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParamWrite 1000000 3847 ns/op 1144 B/op 13 allocs/op +BenchmarkMartini_ParamWrite 300000 5983 ns/op 1208 B/op 15 allocs/op +BenchmarkPat_ParamWrite 1000000 3637 ns/op 1072 B/op 17 allocs/op +BenchmarkPossum_ParamWrite 1000000 2011 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_ParamWrite 1000000 1335 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_ParamWrite 200000 7270 ns/op 2096 B/op 31 allocs/op +BenchmarkRivet_ParamWrite 3000000 540 ns/op 144 B/op 3 allocs/op +BenchmarkTango_ParamWrite 2000000 775 ns/op 136 B/op 4 allocs/op +BenchmarkTigerTonic_ParamWrite 300000 5723 ns/op 1408 B/op 22 allocs/op +BenchmarkTraffic_ParamWrite 300000 7230 ns/op 2384 B/op 25 allocs/op +BenchmarkVulcan_ParamWrite 2000000 854 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/parse2params.md b/parse2params.md new file mode 100644 index 00000000..272df152 --- /dev/null +++ b/parse2params.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_Parse2Params 5000000 421 ns/op 64 B/op 1 allocs/op +BenchmarkBear_Parse2Params 1000000 1250 ns/op 496 B/op 5 allocs/op +BenchmarkBeego_Parse2Params 1000000 1436 ns/op 128 B/op 4 allocs/op +BenchmarkBone_Parse2Params 1000000 1192 ns/op 416 B/op 3 allocs/op +BenchmarkDenco_Parse2Params 5000000 373 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_Parse2Params 10000000 131 ns/op 0 B/op 0 allocs/op +BenchmarkGin_Parse2Params 20000000 118 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_Parse2Params 1000000 2030 ns/op 712 B/op 9 allocs/op +BenchmarkGoji_Parse2Params 2000000 946 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_Parse2Params 2000000 954 ns/op 192 B/op 5 allocs/op +BenchmarkGoJsonRest_Parse2Params 1000000 2251 ns/op 713 B/op 14 allocs/op +BenchmarkGoRestful_Parse2Params 100000 22051 ns/op 6856 B/op 39 allocs/op +BenchmarkGorillaMux_Parse2Params 500000 3574 ns/op 768 B/op 8 allocs/op +BenchmarkHttpRouter_Parse2Params 10000000 238 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_Parse2Params 1000000 1007 ns/op 384 B/op 4 allocs/op +BenchmarkIris_Parse2Params 30000000 52.0 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_Parse2Params 2000000 747 ns/op 128 B/op 5 allocs/op +BenchmarkLARS_Parse2Params 20000000 119 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_Parse2Params 1000000 2984 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_Parse2Params 300000 4966 ns/op 1136 B/op 11 allocs/op +BenchmarkPat_Parse2Params 1000000 2879 ns/op 832 B/op 17 allocs/op +BenchmarkPossum_Parse2Params 1000000 1703 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_Parse2Params 1000000 1187 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_Parse2Params 300000 5790 ns/op 1728 B/op 28 allocs/op +BenchmarkRivet_Parse2Params 5000000 395 ns/op 96 B/op 1 allocs/op +BenchmarkTango_Parse2Params 1000000 1832 ns/op 416 B/op 11 allocs/op +BenchmarkTigerTonic_Parse2Params 500000 5286 ns/op 1376 B/op 22 allocs/op +BenchmarkTraffic_Parse2Params 300000 5793 ns/op 2040 B/op 22 allocs/op +BenchmarkVulcan_Parse2Params 1000000 1059 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/parse_test.go b/parse_test.go index 80058da5..efad9395 100644 --- a/parse_test.go +++ b/parse_test.go @@ -71,6 +71,7 @@ var ( parseGorillaMux http.Handler parseHttpRouter http.Handler parseHttpTreeMux http.Handler + parseIris http.Handler parseKocha http.Handler parseLARS http.Handler parseMacaron http.Handler @@ -135,6 +136,9 @@ func init() { calcMem("HttpTreeMux", func() { parseHttpTreeMux = loadHttpTreeMux(parseAPI) }) + calcMem("Iris", func() { + parseIris = loadIris(parseAPI) + }) calcMem("Kocha", func() { parseKocha = loadKocha(parseAPI) }) @@ -242,6 +246,10 @@ func BenchmarkHttpTreeMux_ParseStatic(b *testing.B) { req, _ := http.NewRequest("GET", "/1/users", nil) benchRequest(b, parseHttpTreeMux, req) } +func BenchmarkIris_ParseStatic(b *testing.B) { + req, _ := http.NewRequest("GET", "/1/users", nil) + benchRequest(b, parseIris, req) +} func BenchmarkKocha_ParseStatic(b *testing.B) { req, _ := http.NewRequest("GET", "/1/users", nil) benchRequest(b, parseKocha, req) @@ -361,6 +369,10 @@ func BenchmarkHttpTreeMux_ParseParam(b *testing.B) { req, _ := http.NewRequest("GET", "/1/classes/go", nil) benchRequest(b, parseHttpTreeMux, req) } +func BenchmarkIris_ParseParam(b *testing.B) { + req, _ := http.NewRequest("GET", "/1/classes/go", nil) + benchRequest(b, parseIris, req) +} func BenchmarkKocha_ParseParam(b *testing.B) { req, _ := http.NewRequest("GET", "/1/classes/go", nil) benchRequest(b, parseKocha, req) @@ -480,6 +492,10 @@ func BenchmarkHttpTreeMux_Parse2Params(b *testing.B) { req, _ := http.NewRequest("GET", "/1/classes/go/123456789", nil) benchRequest(b, parseHttpTreeMux, req) } +func BenchmarkIris_Parse2Params(b *testing.B) { + req, _ := http.NewRequest("GET", "/1/classes/go/123456789", nil) + benchRequest(b, parseIris, req) +} func BenchmarkKocha_Parse2Params(b *testing.B) { req, _ := http.NewRequest("GET", "/1/classes/go/123456789", nil) benchRequest(b, parseKocha, req) @@ -584,6 +600,9 @@ func BenchmarkHttpRouter_ParseAll(b *testing.B) { func BenchmarkHttpTreeMux_ParseAll(b *testing.B) { benchRoutes(b, parseHttpTreeMux, parseAPI) } +func BenchmarkIris_ParseAll(b *testing.B) { + benchRoutes(b, parseIris, parseAPI) +} func BenchmarkKocha_ParseAll(b *testing.B) { benchRoutes(b, parseKocha, parseAPI) } diff --git a/parseall.md b/parseall.md new file mode 100644 index 00000000..a506e07b --- /dev/null +++ b/parseall.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_ParseAll 200000 9285 ns/op 640 B/op 16 allocs/op +BenchmarkBear_ParseAll 50000 27281 ns/op 8928 B/op 110 allocs/op +BenchmarkBeego_ParseAll 100000 23191 ns/op 800 B/op 36 allocs/op +BenchmarkBone_ParseAll 50000 29121 ns/op 8048 B/op 90 allocs/op +BenchmarkDenco_ParseAll 300000 6850 ns/op 928 B/op 16 allocs/op +BenchmarkEcho_ParseAll 300000 4143 ns/op 0 B/op 0 allocs/op +BenchmarkGin_ParseAll 500000 3680 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParseAll 30000 41269 ns/op 13728 B/op 181 allocs/op +BenchmarkGoji_ParseAll 100000 19371 ns/op 5376 B/op 32 allocs/op +BenchmarkGojiv2_ParseAll 100000 22791 ns/op 4496 B/op 121 allocs/op +BenchmarkGoJsonRest_ParseAll 30000 48336 ns/op 13866 B/op 321 allocs/op +BenchmarkGoRestful_ParseAll 5000 447025 ns/op 125600 B/op 868 allocs/op +BenchmarkGorillaMux_ParseAll 10000 126807 ns/op 16560 B/op 198 allocs/op +BenchmarkHttpRouter_ParseAll 500000 4346 ns/op 640 B/op 16 allocs/op +BenchmarkHttpTreeMux_ParseAll 100000 15080 ns/op 5728 B/op 51 allocs/op +BenchmarkIris_ParseAll 1000000 2233 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParseAll 200000 10095 ns/op 1112 B/op 54 allocs/op +BenchmarkLARS_ParseAll 500000 3672 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParseAll 20000 72204 ns/op 24160 B/op 224 allocs/op +BenchmarkMartini_ParseAll 10000 134707 ns/op 25600 B/op 276 allocs/op +BenchmarkPat_ParseAll 30000 55703 ns/op 17264 B/op 343 allocs/op +BenchmarkPossum_ParseAll 50000 31801 ns/op 10816 B/op 78 allocs/op +BenchmarkR2router_ParseAll 100000 25061 ns/op 8352 B/op 120 allocs/op +BenchmarkRevel_ParseAll 10000 132607 ns/op 39424 B/op 652 allocs/op +BenchmarkRivet_ParseAll 300000 6797 ns/op 912 B/op 16 allocs/op +BenchmarkTango_ParseAll 50000 38662 ns/op 7664 B/op 240 allocs/op +BenchmarkTigerTonic_ParseAll 20000 72554 ns/op 19424 B/op 360 allocs/op +BenchmarkTraffic_ParseAll 10000 147408 ns/op 57776 B/op 642 allocs/op +BenchmarkVulcan_ParseAll 50000 28641 ns/op 2548 B/op 78 allocs/op +``` \ No newline at end of file diff --git a/parseparam.md b/parseparam.md new file mode 100644 index 00000000..71a9bfca --- /dev/null +++ b/parseparam.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_ParseParam 5000000 397 ns/op 64 B/op 1 allocs/op +BenchmarkBear_ParseParam 1000000 1084 ns/op 467 B/op 5 allocs/op +BenchmarkBeego_ParseParam 1000000 1171 ns/op 64 B/op 4 allocs/op +BenchmarkBone_ParseParam 1000000 1320 ns/op 464 B/op 4 allocs/op +BenchmarkDenco_ParseParam 5000000 316 ns/op 64 B/op 1 allocs/op +BenchmarkEcho_ParseParam 20000000 106 ns/op 0 B/op 0 allocs/op +BenchmarkGin_ParseParam 20000000 97.3 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParseParam 1000000 1634 ns/op 664 B/op 8 allocs/op +BenchmarkGoji_ParseParam 2000000 928 ns/op 336 B/op 2 allocs/op +BenchmarkGojiv2_ParseParam 2000000 986 ns/op 208 B/op 6 allocs/op +BenchmarkGoJsonRest_ParseParam 1000000 1816 ns/op 649 B/op 13 allocs/op +BenchmarkGoRestful_ParseParam 100000 13360 ns/op 4024 B/op 31 allocs/op +BenchmarkGorillaMux_ParseParam 500000 3366 ns/op 752 B/op 8 allocs/op +BenchmarkHttpRouter_ParseParam 10000000 225 ns/op 64 B/op 1 allocs/op +BenchmarkHttpTreeMux_ParseParam 2000000 706 ns/op 352 B/op 3 allocs/op +BenchmarkIris_ParseParam 30000000 50.8 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParseParam 5000000 406 ns/op 56 B/op 3 allocs/op +BenchmarkLARS_ParseParam 20000000 101 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParseParam 1000000 2744 ns/op 1040 B/op 9 allocs/op +BenchmarkMartini_ParseParam 300000 5056 ns/op 1104 B/op 11 allocs/op +BenchmarkPat_ParseParam 1000000 2871 ns/op 1120 B/op 17 allocs/op +BenchmarkPossum_ParseParam 1000000 1701 ns/op 560 B/op 6 allocs/op +BenchmarkR2router_ParseParam 1000000 1033 ns/op 432 B/op 5 allocs/op +BenchmarkRevel_ParseParam 500000 5266 ns/op 1664 B/op 26 allocs/op +BenchmarkRivet_ParseParam 5000000 264 ns/op 48 B/op 1 allocs/op +BenchmarkTango_ParseParam 1000000 1387 ns/op 288 B/op 9 allocs/op +BenchmarkTigerTonic_ParseParam 1000000 3236 ns/op 992 B/op 16 allocs/op +BenchmarkTraffic_ParseParam 500000 5372 ns/op 2248 B/op 23 allocs/op +BenchmarkVulcan_ParseParam 2000000 949 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/parsestatic.md b/parsestatic.md new file mode 100644 index 00000000..0e5b185b --- /dev/null +++ b/parsestatic.md @@ -0,0 +1,31 @@ +``` +BenchmarkAce_ParseStatic 10000000 199 ns/op 0 B/op 0 allocs/op +BenchmarkBear_ParseStatic 3000000 497 ns/op 120 B/op 3 allocs/op +BenchmarkBeego_ParseStatic 1000000 1010 ns/op 32 B/op 4 allocs/op +BenchmarkBone_ParseStatic 2000000 685 ns/op 144 B/op 3 allocs/op +BenchmarkDenco_ParseStatic 30000000 47.2 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_ParseStatic 20000000 92.5 ns/op 0 B/op 0 allocs/op +BenchmarkGin_ParseStatic 20000000 91.5 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_ParseStatic 2000000 944 ns/op 296 B/op 5 allocs/op +BenchmarkGoji_ParseStatic 5000000 251 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_ParseStatic 2000000 638 ns/op 160 B/op 4 allocs/op +BenchmarkGoJsonRest_ParseStatic 1000000 1218 ns/op 329 B/op 11 allocs/op +BenchmarkGoRestful_ParseStatic 200000 12490 ns/op 3656 B/op 30 allocs/op +BenchmarkGorillaMux_ParseStatic 500000 2952 ns/op 448 B/op 7 allocs/op +BenchmarkHttpRouter_ParseStatic 50000000 36.8 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_ParseStatic 20000000 70.8 ns/op 0 B/op 0 allocs/op +BenchmarkIris_ParseStatic 30000000 49.2 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_ParseStatic 20000000 60.0 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_ParseStatic 20000000 92.9 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_ParseStatic 1000000 2265 ns/op 752 B/op 8 allocs/op +BenchmarkMartini_ParseStatic 500000 4386 ns/op 784 B/op 10 allocs/op +BenchmarkPat_ParseStatic 2000000 820 ns/op 240 B/op 5 allocs/op +BenchmarkPossum_ParseStatic 1000000 1178 ns/op 416 B/op 3 allocs/op +BenchmarkR2router_ParseStatic 2000000 608 ns/op 144 B/op 4 allocs/op +BenchmarkRevel_ParseStatic 500000 4662 ns/op 1248 B/op 23 allocs/op +BenchmarkRivet_ParseStatic 20000000 85.7 ns/op 0 B/op 0 allocs/op +BenchmarkTango_ParseStatic 1000000 1284 ns/op 256 B/op 9 allocs/op +BenchmarkTigerTonic_ParseStatic 5000000 306 ns/op 48 B/op 1 allocs/op +BenchmarkTraffic_ParseStatic 500000 4098 ns/op 1816 B/op 20 allocs/op +BenchmarkVulcan_ParseStatic 2000000 832 ns/op 98 B/op 3 allocs/op +``` \ No newline at end of file diff --git a/routers.go b/routers.go index 94c94564..3bc69f43 100644 --- a/routers.go +++ b/routers.go @@ -32,7 +32,9 @@ import ( "github.com/gocraft/web" "github.com/gorilla/mux" "github.com/julienschmidt/httprouter" - "github.com/labstack/echo" + "github.com/kataras/iris" + //"github.com/labstack/echo" + "gopkg.in/labstack/echo.v1" llog "github.com/lunny/log" "github.com/lunny/tango" vulcan "github.com/mailgun/route" @@ -785,6 +787,36 @@ func loadHttpTreeMuxSingle(method, path string, handler httptreemux.HandlerFunc) return router } +// Iris +func irisHandler(_ *iris.Context) {} + +func irisHandlerWrite(c *iris.Context) { + io.WriteString(c.ResponseWriter, c.Param("name")) +} + +func irisHandlerTest(c *iris.Context) { + io.WriteString(c.ResponseWriter, c.Request.RequestURI) +} + +func loadIris(routes []route) http.Handler { + h := irisHandler + if loadTestHandler { + h = irisHandlerTest + } + + router := iris.New() + for _, route := range routes { + router.HandleFunc(route.method, route.path, h) + } + return router.Serve() +} + +func loadIrisSingle(method, path string, handle iris.HandlerFunc) http.Handler { + router := iris.New() + router.HandleFunc(method, path, handle) + return router.Serve() +} + // Kocha-urlrouter type kochaHandler struct { routerMap map[string]urlrouter.URLRouter diff --git a/routers_test.go b/routers_test.go index 706a378e..bd1ef38d 100644 --- a/routers_test.go +++ b/routers_test.go @@ -13,7 +13,7 @@ var ( load func(routes []route) http.Handler }{ {"Ace", loadAce}, - {"Bear", loadBear}, + //|ERROR: bear/context.go0x125 nil on .Next| {"Bear", loadBear}, {"Beego", loadBeego}, {"Bone", loadBone}, {"Denco", loadDenco}, @@ -27,6 +27,7 @@ var ( {"GorillaMux", loadGorillaMux}, {"HttpRouter", loadHttpRouter}, {"HttpTreeMux", loadHttpTreeMux}, + {"Iris", loadIris}, //{"Kocha", loadKocha}, {"LARS", loadLARS}, {"Macaron", loadMacaron}, @@ -35,7 +36,7 @@ var ( {"Possum", loadPossum}, {"R2router", loadR2router}, {"Revel", loadRevel}, - {"Rivet", loadRivet}, + //|Too many logs on Static API expect different body| {"Rivet", loadRivet}, {"Tango", loadTango}, {"TigerTonic", loadTigerTonic}, {"Traffic", loadTraffic}, diff --git a/static_test.go b/static_test.go index d3417658..79410f01 100644 --- a/static_test.go +++ b/static_test.go @@ -187,6 +187,7 @@ var ( staticGorillaMux http.Handler staticHttpRouter http.Handler staticHttpTreeMux http.Handler + staticIris http.Handler staticKocha http.Handler staticLARS http.Handler staticMacaron http.Handler @@ -259,6 +260,9 @@ func init() { calcMem("HttpTreeMux", func() { staticHttpTreeMux = loadHttpTreeMux(staticRoutes) }) + calcMem("Iris", func() { + staticIris = loadIris(staticRoutes) + }) calcMem("Kocha", func() { staticKocha = loadKocha(staticRoutes) }) @@ -355,6 +359,9 @@ func BenchmarkHttpRouter_StaticAll(b *testing.B) { func BenchmarkHttpTreeMux_StaticAll(b *testing.B) { benchRoutes(b, staticHttpRouter, staticRoutes) } +func BenchmarkIris_StaticAll(b *testing.B) { + benchRoutes(b, staticIris, staticRoutes) +} func BenchmarkKocha_StaticAll(b *testing.B) { benchRoutes(b, staticKocha, staticRoutes) } diff --git a/staticall.md b/staticall.md new file mode 100644 index 00000000..7f48a26c --- /dev/null +++ b/staticall.md @@ -0,0 +1,32 @@ +``` +BenchmarkAce_StaticAll 30000 45069 ns/op 0 B/op 0 allocs/op +BenchmarkHttpServeMux_StaticAll 2000 749542 ns/op 96 B/op 8 allocs/op +BenchmarkBeego_StaticAll 10000 229913 ns/op 15744 B/op 628 allocs/op +BenchmarkBear_StaticAll 10000 102805 ns/op 20336 B/op 461 allocs/op +BenchmarkBone_StaticAll 20000 74654 ns/op 0 B/op 0 allocs/op +BenchmarkDenco_StaticAll 100000 12750 ns/op 0 B/op 0 allocs/op +BenchmarkEcho_StaticAll 50000 29521 ns/op 0 B/op 0 allocs/op +BenchmarkGin_StaticAll 50000 27861 ns/op 0 B/op 0 allocs/op +BenchmarkGocraftWeb_StaticAll 10000 165709 ns/op 46440 B/op 785 allocs/op +BenchmarkGoji_StaticAll 20000 60603 ns/op 0 B/op 0 allocs/op +BenchmarkGojiv2_StaticAll 10000 155908 ns/op 25120 B/op 628 allocs/op +BenchmarkGoJsonRest_StaticAll 10000 246314 ns/op 51653 B/op 1727 allocs/op +BenchmarkGoRestful_StaticAll 300 5300303 ns/op 392312 B/op 4694 allocs/op +BenchmarkGorillaMux_StaticAll 1000 2013115 ns/op 70432 B/op 1107 allocs/op +BenchmarkHttpRouter_StaticAll 100000 16890 ns/op 0 B/op 0 allocs/op +BenchmarkHttpTreeMux_StaticAll 100000 16830 ns/op 0 B/op 0 allocs/op +BenchmarkIris_StaticAll 100000 15580 ns/op 0 B/op 0 allocs/op +BenchmarkKocha_StaticAll 100000 23181 ns/op 0 B/op 0 allocs/op +BenchmarkLARS_StaticAll 50000 27121 ns/op 0 B/op 0 allocs/op +BenchmarkMacaron_StaticAll 5000 374421 ns/op 118065 B/op 1256 allocs/op +BenchmarkMartini_StaticAll 500 2550146 ns/op 132818 B/op 2178 allocs/op +BenchmarkPat_StaticAll 1000 1524087 ns/op 533904 B/op 11123 allocs/op +BenchmarkPossum_StaticAll 10000 183510 ns/op 65312 B/op 471 allocs/op +BenchmarkR2router_StaticAll 10000 114406 ns/op 22608 B/op 628 allocs/op +BenchmarkRevel_StaticAll 3000 698039 ns/op 198240 B/op 3611 allocs/op +BenchmarkRivet_StaticAll 50000 32081 ns/op 0 B/op 0 allocs/op +BenchmarkTango_StaticAll 10000 268015 ns/op 40481 B/op 1413 allocs/op +BenchmarkTigerTonic_StaticAll 20000 63353 ns/op 7504 B/op 157 allocs/op +BenchmarkTraffic_StaticAll 1000 1976113 ns/op 729736 B/op 14287 allocs/op +BenchmarkVulcan_StaticAll 10000 198611 ns/op 15386 B/op 471 allocs/op +``` \ No newline at end of file