New PHP router wich is 7 to 15 times faster then Symfony router

Intro

Hi people! I want to continue the previous article in wich I have compared mezon/router with the klein router.

And in this article I shall compare mezon router with the Symfony routing class.

Benchmark for mezon/router

But now I have decided to change benchmark a little bit. Since now we shall take into consideration not only routing itself but also creation of the router object.

For example we shall benchmark not only this code:

But this one:

Benchmark for klein/klein

The same changes will be made for klein benchmark:

And:

Benchmark for symfony routing

And now it is time to look at the symphony benchmark code:

And for URLs with parameters:

And the results are (the bigger numbers means better):

As you can see — Mezon router is 7 to 15 times faster than Symfony router.

What is mezon/router?

mezon/router now is:

  • framework for routing with 100% code coverage
  • 10.0 points on scrutinizer-ci.com
  • router is a part of the Mezon Project

Repo on github.com: https://github.com/alexdodonov/mezon-router

I’ll be very glad if you’ll press “STAR” button in Github repo )

php developer