跳转到内容

基准测试

Gin 使用了自定义版本的 HttpRouter

查看所有基准测试

TestRepetitionsTime (ns/op)Bytes (B/op)Allocations (allocs/op)
BenchmarkGin_GithubStatic1562947276.700
BenchmarkAce_GithubStatic1554261275.900
BenchmarkAero_GithubStatic2477715148.500
BenchmarkBear_GithubStatic27888944351203
BenchmarkBeego_GithubStatic100000010643523
BenchmarkBone_GithubStatic9350712838288060
BenchmarkChi_GithubStatic13877438604323
BenchmarkDenco_GithubStatic3938499630.400
BenchmarkEcho_GithubStatic1207638299.100
BenchmarkGocraftWeb_GithubStatic15964957562965
BenchmarkGoji_GithubStatic636487618900
BenchmarkGojiv2_GithubStatic5502022098131210
BenchmarkGoRestful_GithubStatic10218312552425613
BenchmarkGoJsonRest_GithubStatic1000000102932911
BenchmarkGorillaMux_GithubStatic25555251909769
BenchmarkGowwwRouter_GithubStatic1553191677.100
BenchmarkHttpRouter_GithubStatic2792072443.100
BenchmarkHttpTreeMux_GithubStatic2144895355.800
BenchmarkKocha_GithubStatic2140531056.000
BenchmarkLARS_GithubStatic1362515689.000
BenchmarkMacaron_GithubStatic100000017477368
BenchmarkMartini_GithubStatic18718673267689
BenchmarkPat_GithubStatic10914311563364876
BenchmarkPossum_GithubStatic15758987704163
BenchmarkR2router_GithubStatic30462314041444
BenchmarkRivet_GithubStatic1148482610500
BenchmarkTango_GithubStatic100000011532488
BenchmarkTigerTonic_GithubStatic4929780249481
BenchmarkTraffic_GithubStatic10635111819466490
BenchmarkVulcan_GithubStatic1613271722983
BenchmarkAce_GithubParam838603214300
BenchmarkAero_GithubParam1181620010200
BenchmarkBear_GithubParam100000010124965
BenchmarkBeego_GithubParam100000011573523
BenchmarkBone_GithubParam1846536912188819
BenchmarkChi_GithubParam100000011024323
BenchmarkDenco_GithubParam34847983521281
BenchmarkEcho_GithubParam633738018900
BenchmarkGin_GithubParam913203213100
BenchmarkGocraftWeb_GithubParam100000014467129
BenchmarkGoji_GithubParam12486409773362
BenchmarkGojiv2_GithubParam3832332784140813
BenchmarkGoJsonRest_GithubParam1000000199171314
BenchmarkGoRestful_GithubParam7641416015435216
BenchmarkGorillaMux_GithubParam1500267663129610
BenchmarkGowwwRouter_GithubParam15920447514323
BenchmarkHttpRouter_GithubParam1042062811500
BenchmarkHttpTreeMux_GithubParam14037558353844
BenchmarkKocha_GithubParam22861705331285
BenchmarkLARS_GithubParam954037412900
BenchmarkMacaron_GithubParam5331542742107210
BenchmarkMartini_GithubParam1193979638115211
BenchmarkPat_GithubParam1506758858240848
BenchmarkPossum_GithubParam100000010014965
BenchmarkR2router_GithubParam16028867614325
BenchmarkRivet_GithubParam2986579409961
BenchmarkTango_GithubParam100000013563448
BenchmarkTigerTonic_GithubParam3888993429117622
BenchmarkTraffic_GithubParam1231609734281640
BenchmarkVulcan_GithubParam10000001138983
BenchmarkAce_GithubAll405432967000
BenchmarkAero_GithubAll576322064800
BenchmarkBear_GithubAll923421617986448943
BenchmarkBeego_GithubAll740724349671456609
BenchmarkBone_GithubAll42029228357201608620
BenchmarkChi_GithubAll762023833187696609
BenchmarkDenco_GithubAll183556449420224167
BenchmarkEcho_GithubAll312513847900
BenchmarkGin_GithubAll435502736400
BenchmarkGocraftWeb_GithubAll41173000621316561686
BenchmarkGoji_GithubAll327441615856112334
BenchmarkGojiv2_GithubAll14028705183527204321
BenchmarkGoJsonRest_GithubAll29764015071343712737
BenchmarkGoRestful_GithubAll41029131589101442938
BenchmarkGorillaMux_GithubAll34633849872516501994
BenchmarkGowwwRouter_GithubAll1000014302572144501
BenchmarkHttpRouter_GithubAll559382136000
BenchmarkHttpTreeMux_GithubAll1000015394465856671
BenchmarkKocha_GithubAll1000010631523304843
BenchmarkLARS_GithubAll477792508400
BenchmarkMacaron_GithubAll32663719071494091624
BenchmarkMartini_GithubAll33134447062265512325
BenchmarkPat_GithubAll2734381818148315226963
BenchmarkPossum_GithubAll1000016436784448609
BenchmarkR2router_GithubAll1000016022077328979
BenchmarkRivet_GithubAll146258245316272167
BenchmarkTango_GithubAll6255279611638261618
BenchmarkTigerTonic_GithubAll20086878741938564474
BenchmarkTraffic_GithubAll355347850882074414114
BenchmarkVulcan_GithubAll688519333319894609
  • (1):在一定的时间内实现的总调用数,越高越好
  • (2):单次操作耗时(ns/op),越低越好
  • (3):堆内存分配 (B/op), 越低越好
  • (4):每次操作的平均内存分配次数(allocs/op),越低越好