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


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

Re: empty function optimizations


> But that fix won't accomplish much, because in almost all cases, the
> instantiations will appear to depend on the template parameters,
> e.g. vector<A*> and vector<B*> will generate the same code, but all
> the methods will depend on the type argument.

Here is an (probably incomplete, perhaps incorrect) list of vector
methods that don't depend on the template parameter:

get_allocator
begin (2x)
end
empty
front
back

So while it is not clear how much that would save, it is certainly
incorrect that there would be no savings.

Regards,
Martin

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