3 ms·
This is cool! I'm actually kind of shocked it performs better than gin (which is based on httprouter). Are you using a specialized prefix tree for the routes?
by bigdubs 11y ago
This is cool!
I'm actually kind of shocked it performs better than gin (which is based on httprouter). Are you using a specialized prefix tree for the routes?
- melle 11y agoI'm not sure this is the case, at least not according to the benchmarks in the gin-gonic/gin repo. This framework was submitted to HN before:https://news.ycombinator.com/item?id=9296524 https://news.ycombinator.com/item?id=9296524 In that discussion the author of gin mentions gin has a zero allocation router as well https://github.com/gin-gonic/gin/issues/249 https://github.com/gin-gonic/gin/issues/249 On mobile right now, will look at the gin/echo benchmarks later (especially if the gin benchmarks compare the fasthttp engine of echo)
- melle 11y agoLooking at https://github.com/gin-gonic/go-http-routing-benchmark/blob/master/bench_test.go https://github.com/gin-gonic/go-http-routing-benchmark/blob/... All echo benches have been commented out, last change about a year ago. Tests do not use echo's fasthttp engine.
- zokier 11y agoThat GH issue is almost exactly a year old and still open, with no recent comments.