Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Further improve performance of JSON serialization on Linux #723
Following on from #718, this change further improves performance of JSON serialization:
These changes were developed by @shmuelk and myself.
Additional performance can be gained by adding similar fast paths for Double and Float, however doing so fails the tests that expect a whole number to be serialized without decimal places (eg.
Update: I've removed the Int/UInt fastpath for now, until I can resolve the control over formatting issue raised in the review below. This PR is now just contains the 1.2x improvement (from case reordering). I'll submit the fastpaths in a future PR.
Using the benchmark I developed for #718, increased to 10,000 repetitions, I get the following results on Ubuntu 16.04:
(units are average execution time in seconds, and the code changes are cumulative).