]> granicus.if.org Git - json-c/commit
json_object: speed up creation of objects
authorRamiro Polla <ramiro.polla@gmail.com>
Sat, 8 Dec 2018 21:14:41 +0000 (22:14 +0100)
committerRamiro Polla <ramiro.polla@gmail.com>
Thu, 20 Dec 2018 23:30:26 +0000 (00:30 +0100)
commit906188e1cfb4a8b64928dc1d872e5aa05ceea87f
tree9cc2bab7da472aa5eb369b7926f5ee7855e0ebf1
parentc9a0ac5886ccdb79457d89e5d197fa041195df04
json_object: speed up creation of objects

Instead of using calloc(), call malloc() and initialize the relevant
fields individually.

speedup for 32-bit: ~15%
speedup for 64-bit: ~ 5%
json_object.c