julienschmidt / go-http-routing-benchmark

Go HTTP request router and web framework benchmark
BSD 3-Clause "New" or "Revised" License
1.65k stars 238 forks source link

Updating the benchmarks #82

Open jwilner opened 5 years ago

jwilner commented 5 years ago

Hi -- I had a lot of fun working with this benchmark suite in developing RTE, so I thought I'd bring the suite up to date and add my router (which maybe makes some controversial decisions, but objectively does pretty darn well I think!).

Just to highlight the single param benchmark:

BenchmarkRTE_Param          20000000            65.5 ns/op         0 B/op          0 allocs/op
BenchmarkGin_Param          20000000            80.0 ns/op         0 B/op          0 allocs/op
BenchmarkLARS_Param         20000000            87.0 ns/op         0 B/op          0 allocs/op
BenchmarkEcho_Param         20000000           105 ns/op           0 B/op          0 allocs/op
BenchmarkHttpRouter_Param   10000000           139 ns/op          32 B/op          1 allocs/op
BenchmarkDenco_Param        10000000           175 ns/op          32 B/op          1 allocs/op
BenchmarkKocha_Param         5000000           325 ns/op          56 B/op          3 allocs/op
BenchmarkVulcan_Param        2000000           724 ns/op          98 B/op          3 allocs/op
BenchmarkHttpTreeMux_Param   2000000           731 ns/op         352 B/op          3 allocs/op
BenchmarkGoji_Param          2000000           806 ns/op         336 B/op          2 allocs/op
BenchmarkR2router_Param      2000000           908 ns/op         432 B/op          5 allocs/op
BenchmarkBear_Param          1000000          1092 ns/op         456 B/op          5 allocs/op
BenchmarkTango_Param         1000000          1337 ns/op         248 B/op          8 allocs/op
BenchmarkPossum_Param        1000000          1633 ns/op         496 B/op          5 allocs/op
BenchmarkBeego_Param         1000000          1656 ns/op         352 B/op          3 allocs/op
BenchmarkGocraftWeb_Param    1000000          1770 ns/op         648 B/op          8 allocs/op
BenchmarkPat_Param           1000000          1848 ns/op         536 B/op         11 allocs/op
BenchmarkBone_Param          1000000          1905 ns/op         816 B/op          6 allocs/op
BenchmarkGoJsonRest_Param    1000000          1979 ns/op         649 B/op         13 allocs/op
BenchmarkTigerTonic_Param    1000000          2984 ns/op         776 B/op         16 allocs/op
BenchmarkGojiv2_Param         500000          2986 ns/op        1328 B/op         11 allocs/op
BenchmarkGorillaMux_Param     500000          3281 ns/op        1280 B/op         10 allocs/op
BenchmarkMacaron_Param        500000          3443 ns/op        1072 B/op         10 allocs/op
BenchmarkTraffic_Param        300000          5251 ns/op        1856 B/op         21 allocs/op
BenchmarkMartini_Param        200000          6191 ns/op        1075 B/op         10 allocs/op
BenchmarkGoRestful_Param      200000          7944 ns/op        2792 B/op         22 allocs/op