yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #04105
boost::serialization benchmark
Hi,
After the 0.5 release (soon), boost::serialization will replace current
serialization system. If you want to try now, add boost-serialization
feature (it slows compilation down a little bit).
For having idea about performance, I run small script comparing storage
size and time for loading saving various data formats supported by
yade's serialization and boost::serialization. The simulation had about
10k particles and 60k interactions. This is the result (the script is
added in r2177 scripts/test/serialization-benchmark.py):
Saved yade xml 103.0MB 14.5s
Loaded yade xml 103.0MB 17.6s
Saved yade xml.bz2 18.6MB 35.8s
Loaded yade xml.bz2 18.6MB 24.1s
Saved boost xml 265.8MB 10.1s
Loaded boost xml 265.8MB 14.7s
Saved boost xml.gz 30.9MB 16.8s
Loaded boost xml.gz 30.9MB 16.5s
Saved boost xml.bz2 23.2MB 51.3s
Loaded boost xml.bz2 23.2MB 23.6s
Saved boost bin 35.4MB 1.1s
Loaded boost bin 35.4MB 0.8s
Saved boost bin.gz 18.0MB 3.0s
Loaded boost bin.gz 18.0MB 1.2s
Saved boost bin.bz2 18.7MB 6.9s
Loaded boost bin.bz2 18.7MB 3.3s
For those who don't like reading: the most storage-efficient is
gzip-compressed boost binary, which is about the same size as
bzip2-compressed yade XML, but faster about 10× for saving and 20× for
loading. Compression takes considerable time, but it is size/time
tradeoff that depends on particular situation.
In boost::sertialization, binary files are not portable accross versions
and architectures, while xml files are _not_ portable across versions
either, but are portable accross architectures.
Cheers, Vaclav