--- 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
--- 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
--- 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
.
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
--- 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
--- 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