Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1RbEwn-0002zB-SO for bitcoin-development@lists.sourceforge.net; Thu, 15 Dec 2011 17:18:21 +0000 X-ACL-Warn: Received: from backup-server.nordu.net ([193.10.252.66]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1RbEwm-0006nC-GZ for bitcoin-development@lists.sourceforge.net; Thu, 15 Dec 2011 17:18:21 +0000 Received: from [192.168.0.20] (2508ds5-oebr.0.fullrate.dk [95.166.54.87]) (authenticated bits=0) by backup-server.nordu.net (8.14.3/8.14.3) with ESMTP id pBFHIApG029840 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 15 Dec 2011 18:18:13 +0100 (CET) From: =?iso-8859-1?Q?Michael_Gr=F8nager?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Thu, 15 Dec 2011 18:18:09 +0100 Message-Id: To: Bitcoin Dev Mime-Version: 1.0 (Apple Message framework v1251.1) X-Mailer: Apple Mail (2.1251.1) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1RbEwm-0006nC-GZ Subject: [Bitcoin-development] CDataStream X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2011 17:18:21 -0000 OK, I admit that this is *really* of little importance...=20 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=3D1000 0 seconds n=3D2000 0 seconds n=3D4000 0 seconds n=3D8000 0 seconds n=3D16000 0 seconds n=3D32000 0 seconds n=3D64000 1 seconds n=3D128000 1 seconds n=3D256000 2 seconds n=3D512000 4 seconds n=3D1024000 8 seconds n=3D2048000 17 seconds n=3D4096000 40 seconds stringstream: n=3D1000 0 seconds n=3D2000 0 seconds n=3D4000 0 seconds n=3D8000 0 seconds n=3D16000 0 seconds n=3D32000 0 seconds n=3D64000 0 seconds n=3D128000 0 seconds n=3D256000 0 seconds n=3D512000 0 seconds n=3D1024000 0 seconds n=3D2048000 1 seconds n=3D4096000 2 seconds