go+json 还是没有python+json 结合得完美,解析速度比python 慢
go 有 map
python 有 dictionary
速度也没python 的快,测试数据:
go 1.4.2
loads 121.017531ms
go-ujson loads 63.217203ms
simplejson loads 90.202043ms
dumps 88.908435ms
python 2.7.3
simplejson
Loads Taken 14.655828476ms
Dumps Taken 28.5069942474ms
ujson
Loads Taken 12.7279758453
Dumps Taken 13.9889717102
json
Loads Taken 36.0250473022
Dumps Taken 23.5030651093
0
See Also
Nearby
- 上一篇 › youBBS v2.01 发布
- 下一篇 › Google 网页性能优化
go 测试代码:
go-ujson官方的loads (decode)的速度是标准库的两倍左右:
https://github.com/mreiferson/go-ujson
python 测试代码:
python 代码好简洁!
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶