Boost序列化性能:文本与二进制格式 [英] Boost serialization performance: text vs. binary format

查看:549
本文介绍了Boost序列化性能:文本与二进制格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果性能是一个问题,我应该喜欢二进制序列化在ascii /文本序列化?

Should I prefer binary serialization over ascii / text serialization if performance is an issue?

有人在大量数据上测试过吗?

Has anybody tested it on a large amount of data?

推荐答案

我使用boost.serialization存储表示查找表的矩阵和向量,
存储一个内存大小约为200MByte的元数据(字符串)。 IIRC从
磁盘加载到内存花了3分钟的文本归档与4秒使用二进制文件
在WinXP。

I used boost.serialization to store matrices and vectors representing lookup tables and some meta data (strings) with an in memory size of about 200MByte. IIRC for loading from disk into memory it took 3 minutes for the text archive vs. 4 seconds using the binary archive on WinXP.

这篇关于Boost序列化性能:文本与二进制格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆