I added gonzales
to my literals-only benchmark (i.e. no params) and it's much slower than matchit
(or my work-in-progress matcher
):
test literals-full/MatchIt/20 ... bench: 608 ns/iter (+/- 17)
test literals-full/Matcher/20 ... bench: 839 ns/iter (+/- 9)
test literals-full/gonzales/20 ... bench: 2378 ns/iter (+/- 30)
test literals-full/MatchIt/200 ... bench: 9089 ns/iter (+/- 67)
test literals-full/Matcher/200 ... bench: 18144 ns/iter (+/- 289)
test literals-full/gonzales/200 ... bench: 49354 ns/iter (+/- 1211)
test literals-full/MatchIt/2000 ... bench: 210733 ns/iter (+/- 1754)
test literals-full/Matcher/2000 ... bench: 346750 ns/iter (+/- 5215)
test literals-full/gonzales/2000 ... bench: 608682 ns/iter (+/- 16586)
Each iteration makes 20/200/2000 matches against 18/180/1800 routes, full code is here.
ps. I'm mentioning this because README says that "gonzales is the fastest http router in the business" but that is not the case here.