Nexus Weblogging
ChinaonRails
You are here ChinaonRails > 架构 > > 序列化数据的速度对比Marshal vs. JSON vs. Eval vs. YAML

bd7lx


58.278%

disconnected
登录后回复主题 | 跳到回复(3)

序列化数据的速度对比Marshal vs. JSON vs. Eval vs. YAML

... by bd7lx ... 2 月 25 天前 ... 154 次点击

Serializing data speed comparison: Marshal vs. JSON vs. Eval vs. YAML

http://www.pauldix.net/2008/08/serializing-dat.html

user system total real
array marshal 0.210000 0.010000 0.220000 ( 0.220701)
array json 2.180000 0.050000 2.230000 ( 2.288489)
array eval 2.090000 0.060000 2.150000 ( 2.240443)
array yaml 26.650000 0.350000 27.000000 ( 27.810609)

hash marshal 2.000000 0.050000 2.050000 ( 2.114950)
hash json 3.700000 0.060000 3.760000 ( 3.881716)
hash eval 5.370000 0.140000 5.510000 ( 6.117947)
hash yaml 68.220000 0.870000 69.090000 ( 72.370784)

Marshal当然是最快


1 - 8-28 10:44
IceskYsl 深圳
yaml不是一般的慢
3 - 10-18 10:06
404 深圳
让YAML读写更快,Syck = YAML + fast.

不光是Ruby
看完之后有话想说?那就帮楼主加盖一层吧!

在回复之前你需要先进行登录
电子邮件或昵称
密码
© 2007 A Jesse Cai Production   -   About   -   京ICP备07020911号
a site powered by Project Babel