* [Bitcoin-development] CDataStream
@ 2011-12-15 17:18 Michael Grønager
0 siblings, 0 replies; only message in thread
From: Michael Grønager @ 2011-12-15 17:18 UTC (permalink / raw)
To: Bitcoin Dev
OK, I admit that this is *really* of little importance...
But could someone with commit rights please update the CDataStream test table in the code. The arguments for the custom stream are just way off (stringstream wins by factor 10-20!). On OS X (g++) I get:
Further, if you get(got) bad stringstream numbers on e.g. windows (dikumware had some issues several years ago) you can improve just by changing the default allocation chunk size. So... speed is not a reason for reimplementing stringstream. (And perhaps this can motivate someone to revert bitcoin to stringstream ;-)
Cheers,
Michael
PS: Could be fun to see the output on other OS'es !
serialize.h (with TESTCDATASTREAM defined, i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)):
CDataStream:
n=1000 0 seconds
n=2000 0 seconds
n=4000 0 seconds
n=8000 0 seconds
n=16000 0 seconds
n=32000 0 seconds
n=64000 1 seconds
n=128000 1 seconds
n=256000 2 seconds
n=512000 4 seconds
n=1024000 8 seconds
n=2048000 17 seconds
n=4096000 40 seconds
stringstream:
n=1000 0 seconds
n=2000 0 seconds
n=4000 0 seconds
n=8000 0 seconds
n=16000 0 seconds
n=32000 0 seconds
n=64000 0 seconds
n=128000 0 seconds
n=256000 0 seconds
n=512000 0 seconds
n=1024000 0 seconds
n=2048000 1 seconds
n=4096000 2 seconds
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-12-15 17:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-15 17:18 [Bitcoin-development] CDataStream Michael Grønager
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox