[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | C++ |
Notice: | Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS) |
Moderator: | DECCXX::AMARTIN |
|
Created: | Fri Nov 06 1987 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3604 |
Total number of notes: | 18242 |
3592.0. "+= copying strings??" by KERNEL::PULLEY (Come! while living waters flow) Thu May 29 1997 10:18
Hi,
On Digital UNIX v4.0b, C++ v5.5-004, I've tryed the program below which
takes a few minutes to run.
It basically gets slower & slower.
Does my system/process just need tuning?
Thanks,
Steve.
#include <string>
void main ()
{
string dots (10000, '.');
string s;
for (int i = 0; i < 10; i++)
{
s+=dots;
cerr << " " << i << ": size = " << s.size() << endl;
}
}
T.R | Title | User | Personal Name | Date | Lines |
---|
3592.1 | V5.5 string has performance problems, can you upgrade to V5.6? | DECC::J_WARD | | Thu May 29 1997 10:31 | 36 |
|
I'd suggest upgrading to V5.6, this is the Rogue Wave
implementation and it also has copy-on-write.
for V5.5:
cosf.zko.dec.com> time a.out
0: size = 10000
1: size = 20000
2: size = 30000
3: size = 40000
4: size = 50000
5: size = 60000
6: size = 70000
7: size = 80000
8: size = 90000
9: size = 100000
68.42u 0.01s 1:08 99% 0+3k 0+0io 0pf+0w
for V5.6:
cosf.zko.dec.com> time a.out
0: size = 10000
1: size = 20000
2: size = 30000
3: size = 40000
4: size = 50000
5: size = 60000
6: size = 70000
7: size = 80000
8: size = 90000
9: size = 100000
0.01u 0.01s 0:00 100% 0+2k 0+0io 0pf+0w
|