micro-router
micro-router copied to clipboard
Fastify benchmark lists this package as a performance killer
https://github.com/fastify/fastify
| Framework | Version | Router? | Requests/sec |
|---|---|---|---|
| micro (microrouter) | 9.1.0 ([email protected] ) | ✓ | 18,314 |
| micro | 9.1.0 | ✗ | 31,793 |
Is this out of date or accurate? Can anything be done to make this package not be a performance killer?
Also interested in this subject. My wild guess culprit could be url / url-pattern as it's relying on some [slow] regex.
Tried https://github.com/petkaantonov/urlparser Some benchmarks:
With node url:
Both are awesome but micro is 67.92% faster than microrouter
• micro request average is 13524
• microrouter request average is 8054
✨ Done in 4.86s.
With fast-url-parser:
Both are awesome but micro is 51.92% faster than microrouter
• micro request average is 14260
• microrouter request average is 9386.4
✨ Done in 3.48s.
So there are some improvements as you can see. I can send PR ( using fastify benchmarks https://github.com/fastify/benchmarks )
Looks like should be possible to boost more performance refactoring url-pattern