The new version of Gson (v0.7.0) has been released and is now over 50% faster than it was before.
Using this benchmarking library yields some impressive results:
The methods that beat it are skipping programmatically determining the steps for serialization. the tsantos benchmark writes out the steps into a php file and runs that. The symfony custom denormalizer delegates deserialization to a user method that returns the expected result. Gson can do that as well, but I didn’t create a benchmark for it.
I’ve updated the docs with some ways to take advantage of the library: https://github.com/tebru/gson-php/blob/master/docs/Performance.md
submitted by /u/prgmctan
[link] [comments]