7 comments

[ 3.3 ms ] story [ 28.7 ms ] thread
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...

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.

Appreciate the effort but routing performance is the last thing i'd probably try to optimize in my application.
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.

I hope I will teach it to cache routes soon
Perhaps the then isn't a typo and the message is that this router is 50 times faster but not very useful so THEN you use laravel.
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.