[Bug libstdc++/29688] resize initializes whole array

2006-11-13 Thread pcarlini at suse dot de
--- Comment #6 from pcarlini at suse dot de 2006-11-14 00:53 --- I have analized in detail the case at issue (resize to the same size of the current one) and came to the conclusion that trying to optimize for it (at the cost of increasing the size of the inlined function) isn't really wo

[Bug libstdc++/29688] resize initializes whole array

2006-11-02 Thread fang at csl dot cornell dot edu
--- Comment #5 from fang at csl dot cornell dot edu 2006-11-03 07:28 --- > There is no argument against the ISO standard, but to a non C/C++ programmer > it seems a waist of time to reallocate the array and initialize it when one > wants to add something to an array. Some other compil

[Bug libstdc++/29688] resize initializes whole array

2006-11-02 Thread pcarlini at suse dot de
--- Comment #4 from pcarlini at suse dot de 2006-11-03 00:08 --- (In reply to comment #3) > Subject: Re: resize initializes whole array > > There is no argument against the ISO standard, but to a non C/C++ programmer > it seems a waist of time to reallocate the array and initialize it

[Bug libstdc++/29688] resize initializes whole array

2006-11-02 Thread theo dot bosman at net dot HCC dot nl
. Theo Bosman - Original Message - From: "pcarlini at suse dot de" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 02, 2006 2:51 PM Subject: [Bug libstdc++/29688] resize initializes whole array > > > --- Comment #2 from pcarlini a

[Bug libstdc++/29688] resize initializes whole array

2006-11-02 Thread pcarlini at suse dot de
--- Comment #2 from pcarlini at suse dot de 2006-11-02 13:51 --- The only possible change I can see, as an optimization, is using __valarray_fill instead of __valarray_destroy_elements and __valarray_fill_construct, when _M_size == __n. Let's ask Gaby... -- pcarlini at suse dot de ch

[Bug libstdc++/29688] resize initializes whole array

2006-11-02 Thread pcarlini at suse dot de
--- Comment #1 from pcarlini at suse dot de 2006-11-02 13:34 --- I do not have Stroustrup at hand, but certainly the ISO C++ Standard 2003, the real reference for our work (we are implementing it), says, in 26.3.2.7/9, that resize first changes the length of *this to sz and then assigns