News for hackers. Stuff that matters.
Re:Show HN: New PHP router wich is up to 20 times faster the... by tyingq on Thursday August 13, 2020 @08:32AM (#24142678)
From what I can tell, the speedup is because it's using var_dump() to a file and require() for persistence to disk and caching. That basically uses the built in opcache as a data cache. It also looks like there's race conditions there: https://github.com/alexdodonov/mezon-router/blob/master/Rout...

I would imagine you could tweak any router to use a cache like Apcu or Redis and get similar numbers.

Re:Show HN: New PHP router wich is up to 20 times faster the... by iillexial on Thursday August 13, 2020 @07:49AM (#24142344)
Interesting title. Why not "New PHP router which is 1.3 times faster than nikic's fast-route"?
Re:Show HN: New PHP router wich is up to 20 times faster the... by tyingq on Thursday August 13, 2020 @09:34AM (#24143157)
It's a little wordy, but for clarity, you would need:

"New PHP router that has caching on by default is 1.3 times faster than nikic's fast-route using the default non-cached dispatcher. No comparison was made with fast-route's cached dispatcher"