What is the difference between "with streambuf" and "w/o streambuf", and what happens if you do binary serialization with zlib or gzip compression?tezeriusz wrote:ZLIB XML with streambuf - iterations:10000
time1 = 14568
filesize1 = 727
[...]
UNCOMP bin w/o streambuf - iterations:10000
time6 = 4771
filesize6 = 510
boost and zlib
Moderator: Committer
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: boost and zlib
Re: boost and zlib
streambuf precisely filtering_streambuf is needed by that compression filters. I wanted to check how it will affect cpu usage.
UNCOMP XML with streambuf - iterations:10000
time0 = 11640
filesize0 = 3698
ZLIB XML with streambuf - iterations:10000
time1 = 16298
filesize1 = 734
GZIP XML with streambuf - iterations:10000
time2 = 17183
filesize2 = 746
BZ2 XML with streambuf - iterations:10000
time3 = 25793
filesize3 = 808
UNCOMP XML w/o streambuf - iterations:10000
time5 = 9624
filesize5 = 3698
UNCOMP bin w/o streambuf - iterations:10000
time6 = 4742
filesize6 = 510
ZLIB BIN with streambuf - iterations:10000
time7 = 7334
filesize7 = 293
GZIP BIN with streambuf - iterations:10000
time8 = 7957
filesize8 = 305
BZ2 BIN with streambuf - iterations:10000
time9 = 10656
filesize9 = 329
UNCOMP XML with streambuf - iterations:10000
time0 = 11640
filesize0 = 3698
ZLIB XML with streambuf - iterations:10000
time1 = 16298
filesize1 = 734
GZIP XML with streambuf - iterations:10000
time2 = 17183
filesize2 = 746
BZ2 XML with streambuf - iterations:10000
time3 = 25793
filesize3 = 808
UNCOMP XML w/o streambuf - iterations:10000
time5 = 9624
filesize5 = 3698
UNCOMP bin w/o streambuf - iterations:10000
time6 = 4742
filesize6 = 510
ZLIB BIN with streambuf - iterations:10000
time7 = 7334
filesize7 = 293
GZIP BIN with streambuf - iterations:10000
time8 = 7957
filesize8 = 305
BZ2 BIN with streambuf - iterations:10000
time9 = 10656
filesize9 = 329
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: boost and zlib
What are the units of time and file size? (ms per 10000 iterations and kB per file?)tezeriusz wrote:UNCOMP bin w/o streambuf - iterations:10000
time6 = 4742
filesize6 = 510
ZLIB BIN with streambuf - iterations:10000
time7 = 7334
filesize7 = 293
Re: boost and zlib
ms per test with is 10000 iterations with compression and decompression from file and with serialization and deserialization and with result test check every iteration. File size is in bytes.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: boost and zlib
Those are pretty small files then... FreeOrion XML save files often end up being several MB. It might be worth trying again with some larger files...?tezeriusz wrote:File size is in bytes.
Re: boost and zlib
no, we do not need larger files. Lets use something that google translator translate as proportions ;]
3698/510 uncompress xml/binary, so save file size(xml) need to be multiple by ~0.1379 and we will got size after conversion to binary from xml. Time is little bit tricky but we can use that same trick to determine results(almost), and of course we can use this to determine best compress method. Do you want that test to check/modify them? They are ugly!
3698/510 uncompress xml/binary, so save file size(xml) need to be multiple by ~0.1379 and we will got size after conversion to binary from xml. Time is little bit tricky but we can use that same trick to determine results(almost), and of course we can use this to determine best compress method. Do you want that test to check/modify them? They are ugly!
Re: boost and zlib
Ok this shows that there is no point in compression if we can use binary serialization output.
The question is what to do next?;] any small task for newb?
The question is what to do next?;] any small task for newb?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: boost and zlib
See: viewtopic.php?f=9&t=4754tezeriusz wrote:The question is what to do next?;] any small task for newb?