summaryrefslogtreecommitdiff
path: root/de/93c97ef248300a6770031296e59c7e5a12dca0
blob: bf9f76ea5c8407dd1327fcac22e41807e7064d9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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 <gronager@ceptacle.com>) 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 <bitcoin-development@lists.sourceforge.net>;
	Thu, 15 Dec 2011 18:18:13 +0100 (CET)
From: =?iso-8859-1?Q?Michael_Gr=F8nager?= <gronager@ceptacle.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Date: Thu, 15 Dec 2011 18:18:09 +0100
Message-Id: <EC9F1E66-F4B7-4FCE-AF98-F1BAF43B39D9@ceptacle.com>
To: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
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: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=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