Am 22.09.2016 um 22:38 schrieb Chris Glover:
For what it's worth, in tests I've done in the past, binary serialization using boost.serialization and other similar systems was not this big of a difference compared to memcpy. I was seeing maybe a 5x to 10x difference compared to memcpy (yours is 50x).
Of course, this depends on a lot of factors, like how much data this is because it would determine if you are memory bound or not, but I am wondering if your cstyle tests are actually being completely optimized away. Have you examined the disassembly? If you find the code is being optimized away, Google Benchmark has a handy "benchmark::DoNotOptimize" function to help keep the optimizer from throwing away the side effects of a particular address.
Hi, i have prepared a comparison of the same code between linux and windows (msvc). There is such a huge gap between linux and windows. I am not sure, if i should post the images to this mailing list. AFAIK is it seen as bad behaviour to post non text to this list, so i added the link. https://www.schorsch-tech.de/doku.php?id=c:boost_serializationwindows Has anyone an idea why this is the case? Look at this diagrams, i cant explain whats happening here. its on the same maschine on bare metal (no VM). Georg