代码表示的是数据格式,DATA_IO_LOAD_SAVE 在 <febird/io/DataIO.h> 中定义
对boost,DATA_IO_LOAD_SAVE 的定义相当于:
#define DATA_IO_LOAD_SAVE(Class, Members) \
friend class boost::serialization::access; \
template<class Archive> \
void serialize(Archive & ar, const unsigned int version) \
{ ar Members; }
数据格式:
struct MyData1
{
uint32_t a, b, c;
uint32_t d[5];
DATA_IO_LOAD_SAVE(MyData1, &a&b&c&d)
};
struct MyData2
{
uint32_t a, b, c, d;
MyData1 e;
DATA_IO_LOAD_SAVE(MyData2, &a&b&c&d&e)
};
struct MyData3
{
uint32_t a, b, c;
uint32_t d;
};
DATA_IO_DUMP_RAW_MEM(MyData3)
struct VarIntD
{
var_uint32_t a, b, c, d, e, f;
VarIntD()
{
a = 127;
b = 128;
c = 128*128;
d = 128*128*128;
e = 128*128*128*128;
f = 1;
}
DATA_IO_LOAD_SAVE(VarIntD, &a&b&c&d&e&f)
};
typedef pair<MyData2, MyData3> MyData23;
boost_bin_save: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 1004, 1004, 1.0000]
vector<MyData1> .size= 4000, time[ 23918, 23918, 1.0000]
vector<string> .size= 4000, time[ 9266, 9266, 1.0000]
map<int,string> .size= 3756, time[ 19434, 19434, 1.0000]
loop{MyData1 }, loop count= 4000, time[ 23592, 23592, 1.0000]
loop{VarIntD }, loop count= 4000, time[ 52832, 52832, 1.0000]
vector<MyData23>, .size= 4000, time[ 68581, 68581, 1.0000]
boost_bin_load: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 766, 766, 1.0000]
vector<MyData1> .size= 4000, time[ 26738, 26738, 1.0000]
vector<string> .size= 4000, time[ 41097, 41097, 1.0000]
map<int,string> .size= 3756, time[ 63985, 63985, 1.0000]
loop{MyData1 }, loop count= 4000, time[ 23486, 23486, 1.0000]
loop{VarIntD }, loop count= 4000, time[ 88218, 88218, 1.0000]
vector<MyData23>, .size= 4000, time[ 75386, 75386, 1.0000]
File Save Native: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 593, 1004, 1.6910]
vector<MyData1> .size= 4000, time[ 1043, 23918, 22.9288]
vector<string> .size= 4000, time[ 3741, 9266, 2.4767]
map<int,string> .size= 3756, time[ 5018, 19434, 3.8723]
loop{MyData1 }, loop count= 4000, time[ 2898, 23592, 8.1390]
loop{VarIntD }, loop count= 4000, time[ 8664, 52832, 6.0977]
vector<MyData23>, .size= 4000, time[ 5768, 68581, 11.8887]
File Load Native: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 400, 766, 1.9156]
vector<MyData1> .size= 4000, time[ 868, 26738, 30.7855]
vector<string> .size= 4000, time[ 3812, 41097, 10.7790]
map<int,string> .size= 3756, time[ 58671, 63985, 1.0906]
loop{MyData1 }, loop count= 4000, time[ 1547, 23486, 15.1780]
loop{VarIntD }, loop count= 4000, time[ 2580, 88218, 34.1866]
vector<MyData23>, .size= 4000, time[ 4667, 75386, 16.1499]
File Save Portable: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 1114, 1004, 0.9010]
vector<MyData1> .size= 4000, time[ 4044, 23918, 5.9143]
vector<string> .size= 4000, time[ 3480, 9266, 2.6628]
map<int,string> .size= 3756, time[ 5089, 19434, 3.8185]
loop{MyData1 }, loop count= 4000, time[ 3622, 23592, 6.5132]
loop{VarIntD }, loop count= 4000, time[ 7255, 52832, 7.2812]
vector<MyData23>, .size= 4000, time[ 6831, 68581, 10.0397]
File Load Portable: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 500, 766, 1.5318]
vector<MyData1> .size= 4000, time[ 1543, 26738, 17.3266]
vector<string> .size= 4000, time[ 3924, 41097, 10.4728]
map<int,string> .size= 3756, time[ 58689, 63985, 1.0902]
loop{MyData1 }, loop count= 4000, time[ 2957, 23486, 7.9425]
loop{VarIntD }, loop count= 4000, time[ 2575, 88218, 34.2497]
vector<MyData23>, .size= 4000, time[ 5375, 75386, 14.0246]
Memory Save Native: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 198, 1004, 5.0705]
vector<MyData1> .size= 4000, time[ 510, 23918, 46.8615]
vector<string> .size= 4000, time[ 3088, 9266, 2.9999]
map<int,string> .size= 3756, time[ 3679, 19434, 5.2817]
loop{MyData1 }, loop count= 4000, time[ 1106, 23592, 21.3311]
loop{VarIntD }, loop count= 4000, time[ 7546, 52832, 7.0006]
vector<MyData23>, .size= 4000, time[ 2242, 68581, 30.5868]
Memory Load Native: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 170, 766, 4.4853]
vector<MyData1> .size= 4000, time[ 505, 26738, 52.9088]
vector<string> .size= 4000, time[ 3134, 41097, 13.1104]
map<int,string> .size= 3756, time[ 58097, 63985, 1.1013]
loop{MyData1 }, loop count= 4000, time[ 114, 23486, 205.5526]
loop{VarIntD }, loop count= 4000, time[ 4586, 88218, 19.2339]
vector<MyData23>, .size= 4000, time[ 1894, 75386, 39.7889]
Memory Save Portable: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 557, 1004, 1.8029]
vector<MyData1> .size= 4000, time[ 2392, 23918, 9.9960]
vector<string> .size= 4000, time[ 2916, 9266, 3.1778]
map<int,string> .size= 3756, time[ 3563, 19434, 5.4539]
loop{MyData1 }, loop count= 4000, time[ 2203, 23592, 10.7061]
loop{VarIntD }, loop count= 4000, time[ 7307, 52832, 7.2294]
vector<MyData23>, .size= 4000, time[ 3742, 68581, 18.3243]
Memory Load Portable: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 301, 766, 2.5464]
vector<MyData1> .size= 4000, time[ 1182, 26738, 22.6056]
vector<string> .size= 4000, time[ 3150, 41097, 13.0453]
map<int,string> .size= 3756, time[ 57657, 63985, 1.1098]
loop{MyData1 }, loop count= 4000, time[ 1549, 23486, 15.1589]
loop{VarIntD }, loop count= 4000, time[ 4610, 88218, 19.1325]
vector<MyData23>, .size= 4000, time[ 2650, 75386, 28.4410]
Uncheck Save Native: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 173, 1004, 5.7797]
vector<MyData1> .size= 4000, time[ 480, 23918, 49.8057]
vector<string> .size= 4000, time[ 2480, 9266, 3.7358]
map<int,string> .size= 3756, time[ 3436, 19434, 5.6552]
loop{MyData1 }, loop count= 4000, time[ 1070, 23592, 22.0381]
loop{VarIntD }, loop count= 4000, time[ 7110, 52832, 7.4300]
vector<MyData23>, .size= 4000, time[ 2155, 68581, 31.8240]
Uncheck Load Native: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 172, 766, 4.4489]
vector<MyData1> .size= 4000, time[ 530, 26738, 50.3747]
vector<string> .size= 4000, time[ 2985, 41097, 13.7681]
map<int,string> .size= 3756, time[ 57228, 63985, 1.1181]
loop{MyData1 }, loop count= 4000, time[ 17, 23486, 1355.9839]
loop{VarIntD }, loop count= 4000, time[ 2472, 88218, 35.6816]
vector<MyData23>, .size= 4000, time[ 1838, 75386, 40.9979]
Uncheck Save Portable: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 518, 1004, 1.9359]
vector<MyData1> .size= 4000, time[ 2415, 23918, 9.9001]
vector<string> .size= 4000, time[ 2430, 9266, 3.8126]
map<int,string> .size= 3756, time[ 3599, 19434, 5.3985]
loop{MyData1 }, loop count= 4000, time[ 2037, 23592, 11.5812]
loop{VarIntD }, loop count= 4000, time[ 7476, 52832, 7.0660]
vector<MyData23>, .size= 4000, time[ 3740, 68581, 18.3325]
Uncheck Load Portable: loop=10, time[febird, boost, ratio=b/f] in us
vector<pair<int,int> >.size= 4000, time[ 281, 766, 2.7232]
vector<MyData1> .size= 4000, time[ 1199, 26738, 22.2897]
vector<string> .size= 4000, time[ 2731, 41097, 15.0437]
map<int,string> .size= 3756, time[ 57136, 63985, 1.1199]
loop{MyData1 }, loop count= 4000, time[ 1578, 23486, 14.8825]
loop{VarIntD }, loop count= 4000, time[ 2628, 88218, 33.5581]
vector<MyData23>, .size= 4000, time[ 2420, 75386, 31.1459]
项目地址:http://code.google.com/p/febird
分享到:
相关推荐
febird implemented a serialization framework(vs boost.serialization/google.protocolbuffer), can be used in protocol parsing, big/small data serialization, even in very small object serialize, ...
远程过程调用(RPC,Remote Procedure Call)是分布式计算领域中的一个重要概念,它允许一个程序在不理解...同时,这也是一个很好的实践机会,让我们能够亲手编写和运行一个简单的RPC应用,从而加深对RPC机制的理解。
小红薯电商实操课小红书开店实操必学课.mp4
AI图像处理工具包-一键抠图、背景切换、旧照片修复、人像漫画化、视频卡通化(Python+OpenCV+Dlib+TensorFlow).zip [资源说明] 1、该项目是团队成员近期最新开发,代码完整,资料齐全,含设计文档等 2、上传的项目源码经过严格测试,功能完善且能正常运行,请放心下载使用! 3、本项目适合计算机相关专业(人工智能、通信工程、自动化、电子信息、物联网等)的高校学生、教师、科研工作者、行业从业者下载使用,可借鉴学习,也可直接作为毕业设计、课程设计、作业、项目初期立项演示等,也适合小白学习进阶,遇到问题不懂就问,欢迎交流。 4、如果基础还行,可以在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 5、不懂配置和运行,可远程教学 欢迎下载,学习使用!
基于java的新能源充电系统设计与实现.docx
吸波材料建模单元周期仿真模拟,参数优化,计算反射损耗,极化角,入射角,等效阻抗等
AGV调度系统的仿真平台(含源码+项目说明+实验结果分析).zip [资源说明] 1、该项目是团队成员近期最新开发,代码完整,资料齐全,含设计文档等 2、上传的项目源码经过严格测试,功能完善且能正常运行,请放心下载使用! 3、本项目适合计算机相关专业(人工智能、通信工程、自动化、电子信息、物联网等)的高校学生、教师、科研工作者、行业从业者下载使用,可借鉴学习,也可直接作为毕业设计、课程设计、作业、项目初期立项演示等,也适合小白学习进阶,遇到问题不懂就问,欢迎交流。 4、如果基础还行,可以在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 5、不懂配置和运行,可远程教学 欢迎下载,学习使用!
【本体】Internet Download Manager v6.42.26.zip
NLP中文垃圾短信分类系统源码+设计全部资料+文档报告(自然语言处理课设).zip [资源说明] 1、该项目是团队成员近期最新开发,代码完整,资料齐全,含设计文档等 2、上传的项目源码经过严格测试,功能完善且能正常运行,请放心下载使用! 3、本项目适合计算机相关专业(人工智能、通信工程、自动化、电子信息、物联网等)的高校学生、教师、科研工作者、行业从业者下载使用,可借鉴学习,也可直接作为毕业设计、课程设计、作业、项目初期立项演示等,也适合小白学习进阶,遇到问题不懂就问,欢迎交流。 4、如果基础还行,可以在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 5、不懂配置和运行,可远程教学 欢迎下载,学习使用!
Python大作业封面.doc
基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业),个人经导师指导并认可通过的毕业设计项目,评审分98分,项目中的源码都是经过本地编译过可运行的,都经过严格调试,确保可以运行!主要针对计算机相关专业的正在做毕业设计的学生和需要项目实战练习的学习者,资源项目的难度比较适中,内容都是经过助教老师审定过的能够满足学习、使用需求,如果有需要的话可以放心下载使用。 基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开
操作系统课后题参考答案
几何图霸软件是一个非常强大的三维几何图形绘制工具,可以根据约束条件绘制标准示意图,写相关技术类文章需要绘图时很适用。
《写给大众的健康饮食指南》.mp4
智能相册Piktures v2.19 build 815 for 高级版.mp4
建行开养老金必中58元微信立减金亲测.mp4
Converter视频音频转换器v2.2.5.2解锁VIP版.mp4
车来了v4.59.0高级版 精准实时公交地铁神器.mp4
基于java的招生宣传管理系统设计与实现.docx