Ivory Serializer Benchmark
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



This project benchmarks the most popular & feature rich PHP serializers. It measures the time consumed during the serialization of an object graph and give you a report of the execution.

The result of the benchmark is directly available on travis: https://travis-ci.org/egeloen/ivory-serializer-benchmark


If you're interesting to use the project locally, follow the next steps.

Clone the project

First clone the project on on your system:

$ git clone git@github.com:egeloen/ivory-serializer-benchmark.git 

Set up the project

The most easy way to set up the project is to install Docker and Docker Composer and build the project. The configuration is shipped with a distribution environment file allowing you to customize your current user/group ID:

$ cp .env.dist .env

The most important part is the USER_ID and GROUP_ID which should match your current user/group.

Once you have configured your environment, you can build the project:

$ docker-compose build

Install dependencies

Install the dependencies via Composer:

$ docker-compose run --rm php composer install


To benchmark a single serialization, you can use:

$ docker-compose run --rm php bin/benchmark

If you want to get a more accurate value, you can use the iteration option which will run the benchmark n times and will give you the average of the executions:

$ docker-compose run --rm php bin/benchmark --iteration 100

If you want to increase the horizontal complexity of the serialization, you can use the horizontal-complexity option which represents a complexity factor:

$ docker-compose run --rm php bin/benchmark --horizontal-complexity 4

If you want to increase the vertical complexity of the serialization, you can use the vertical-complexity option which represents a complexity factor:

$ docker-compose run --rm php bin/benchmark --vertical-complexity 4


We love contributors! Ivory is an open source project. If you'd like to contribute, feel free to propose a PR!.


The Ivory Serializer is under the MIT license. For the full copyright and license information, please read the LICENSE file that was distributed with this source code.