
Show HN: New PHP router wich is 50 times faster then Laravel - gdever
https://github.com/alexdodonov/mezon-router/blob/master/doc/router-laravel.md
======
aaronedam
Those are some opinionated tests for performance checks. What both symfony and
laravel routers achieve with their routers isn't comparable with this router
library. If you want to go a bit further and implement ultimate fastest
routing, create an associative array, routes as key, callable's as value. Will
it be fast, yes. Will it be usable, no.

For more information about routing, plase see Nikita Popov(nikic)'s post about
FastRoute.

[http://nikic.github.io/2014/02/18/Fast-request-routing-
using...](http://nikic.github.io/2014/02/18/Fast-request-routing-using-
regular-expressions.html)

------
derision
Does this test include testing against cached routes? Does your framework
cache routes? Does this integrate into the framework the same as other routing
frameworks? Does it have feature parity?

The biggest thing with all these "x is faster than y" only applies until you
add in the rest of the features.

~~~
gdever
I hope I will teach it to cache routes soon

------
frenchman99
From a quick look, I'm wondering if this integrates with the rest of the
Symfony stack, if that works with API Platform, if it supports subdomain
routing and if it has long time support.

Sure, shaving a few milliseconds off the load time is nice, but it's just one
parameter amongst a whole bunch.

------
timvdalen
I really dislike implicit routing like this - it's just so easy to
accidentally expose an endpoint that's not supposed to be exposed. I think the
first time I ran into a router that worked like this was with yii2 and I
couldn't believe what I was seeing.

Being able to register middleware is also something I really value in a
router.

------
kyriakos
Appreciate the effort but routing performance is the last thing i'd probably
try to optimize in my application.

