您的位置:首页 > Web前端 > JavaScript

Json解析性能比较笔记(一)

2012-12-20 10:38 260 查看
两个json解析性能比较参考地址:




一、Comparison of JSON Parsers Performance on Android

http://www.martinadamek.com/2011/01/31/comparison-of-json-parsers-performance-on-android/

1、简述:

本文主要讲述通过TraceView粗略的测试Android built-in、JSONSimple、Jacketson所得到的结果。

Android built-in: 277ms

JSON.simple: 176ms

Jackson: 99ms

然而,有句话值得学习“it is a pretty stupid kind of a comparison (I am not even calling it benchmark :-) and code
is not exactly one shining example of an Android app, but it could give you an idea. ”从中我得到了"an good idea",既获取了JSON Parsers 的一个答案,也获取了一个以前未接触到的思路"TraceView",更体会到那一丝对编程专研的热情和严谨。

2、延伸:TraceView

上文中提到了TraceView这个Android官方提到的Performance测试工具,个人觉得也非常有用

---可学习参考:


2.1、How can I test an application for performance
in Android?

http://stackoverflow.com/questions/1957135/how-to-test-the-performance-of-an-android-application

2.2、官网地址:

http://developer.android.com/intl/zh-CN/tools/debugging/debugging-tracing.html

2.3、参考资料:

/article/1363597.html


二、JSON Parsers Performance on Android (With Warmup and Multiple Iterations)

http://www.martinadamek.com/2011/02/04/json-parsers-performance-on-android-with-warmup-and-multiple-iterations/

1、简述:

本文是对上一篇的补充,并通过更严谨的测试获取了一个结果。

大致是jackson > gson > android buit-in > jsonsimple

三、参考工程源码地址:

https://github.com/martinadamek/json-android-compare
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: