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 ------------------------------------------------------------------------------ 10 Tips for Better Server Consolidation Server virtualization is being driven by many needs. But none more important than the need to reduce IT complexity while improving strategic productivity. Learn More! http://www.accelacomm.com/jaw/sdnl/114/51507609/ _______________________________________________ Bitcoin-development mailing list Bitcoin-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bitcoin-development