4 ms·
Show HN: New PHP router wich is up to 20 times faster then Aura Router
- iillexial 6y agoInteresting title. Why not "New PHP router which is 1.3 times faster than nikic's fast-route"?
- tyingq 6y agoIt'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"
- deleted 6y ago[deleted]
- tyingq 6y agoFrom 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/RoutesSet.php#L210 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.