router
router copied to clipboard
[Question] Benchmark
Are there any benchmarks available?
No, there are no benchmarks available.
If there were, what would you like to see benchmarked?
Would be nice to see benchmarks for: first route, last route, unknown route matching.
It'd be perfectly possible to run these, yet I'm wondering if they're useful without any context: Speeds will vary per machine and server setup (HTTP Server, PHP version, etc), so they'll need to be compared to other routers before the numbers can make any sense.
But some other routers do more than "just route", they may also include some form of templating, some Request/Response related classes, etc. — so the processing time of those parts should be excluded when comparing, or does one just leave it as is?
Looking forward to hearing your (further) input on this.
I agree. It should be excluded.
Well, that kinda makes it a somewhat difficult to create, as it requires knowledge of how exactly the other routers work …
On a sidenote: I've found https://github.com/c9s/router-benchmark whilst researching this topic. Perhaps that repo could act as a starting point for a benchmark.
I think you can check this https://github.com/jails/php-router-benchmark