This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: totally folding string operations


Paolo Carlini wrote:

>> ... An
>> idea here would be to construct a new optimizer pass which
>> transforms closed pairs of new/delete calls of constant size into
>> alloca(). 
>> 
>> Comments?
>> 
> For now, only a very quick comment (I'm rather sure to say something
> sensible
> at least about this :) I don't think this specific idea would work
> often, for
> the simple reason that typically (by default in mainline, f.i.) we us
> pool allocation and no actual new/delete pairs are involved for short
> string... 

That is great to hear. Is it the same, for, eg., small vectors of PODs?

Giovanni Bajo



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]