Go 标准库,Json 序列化性能问题...JSON 比 XML 和 GOB 慢,而 json 大小小于 xml 文件大小?
请帮忙指出任何错误?
docker@dockhost:~/go/projects/wiki$ go run encoding.go
2016/05/24 00:52:16 Serialization by JSON elapsed: 2152195 us
2016/05/24 00:52:16 students.json 19177782
2016/05/24 00:52:17 Serialization by GOB elapsed: 748867 us
2016/05/24 00:52:17 students.gob 9305166
2016/05/24 00:52:18 Serialization by XML elapsed: 1507397 us
2016/05/24 00:52:18 students.xml 26177780
docker@dockhost:~/go/projects/wiki$ go run encoding.go
2016/05/24 00:52:32 Serialization by JSON elapsed: 1388153 us
2016/05/24 00:52:32 students.json 19177782
2016/05/24 00:52:33 Serialization by GOB elapsed: 502814 us
2016/05/24 00:52:33 students.gob 9305166
2016/05/24 00:52:34 Serialization by XML elapsed: 897859 us
2016/05/24 00:52:34 students.xml 26177780
docker@dockhost:~/go/projects/wiki$ go run encoding.go
2016/05/24 00:52:41 Serialization by JSON elapsed: 1290359 us
2016/05/24 00:52:41 students.json 19177782
2016/05/24 00:52:42 Serialization by GOB elapsed: 434203 us
2016/05/24 00:52:42 students.gob 9305166
2016/05/24 00:52:42 Serialization by XML elapsed: 862379 us
2016/05/24 00:52:42 students.xml 26177780
料青山看我应如是
慕码人2483693
相关分类