From: "Michael Grønager" <gronager@ceptacle.com>
To: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: [Bitcoin-development] CDataStream
Date: Thu, 15 Dec 2011 18:18:09 +0100 [thread overview]
Message-ID: <EC9F1E66-F4B7-4FCE-AF98-F1BAF43B39D9@ceptacle.com> (raw)
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
reply other threads:[~2011-12-15 17:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=EC9F1E66-F4B7-4FCE-AF98-F1BAF43B39D9@ceptacle.com \
--to=gronager@ceptacle.com \
--cc=bitcoin-development@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox