performance of nspropertylistserialization vs nsjsonserialization

爱⌒轻易说出口 提交于 2019-12-08 07:05:35

I can say that NSJSONSerialization is faster than JSONKit, I used it for a Core Graphics project and code which took on average 26ms before is now 16ms, with only changes in the JSON deserialization.

Not sure on NSPropertyListSerialization, but the GitHub page of JSONKit claims it's faster than binary .plist, which leads me to believe that NSJSONSerialization class is the fastest of them all. Correct me if I'm wrong.

I pulled down 200 tweets and profiled parsing the payload using both SBJSON and NSJSONSerialization. The results:

SBJSON: 489ms / 397KB NSJSONSerialization : 133ms / 3.8 KB

NSJSONSerialization has a pretty significant advantage - especially in terms of the memory footprint.

http://blog.skulptstudio.com/nsjsonserialization-vs-sbjson-performance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!