This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: empty function optimizations
- To: martin at loewis dot home dot cs dot tu-berlin dot de (Martin v. Loewis)
- Subject: Re: empty function optimizations
- From: Joe Buck <jbuck at racerx dot synopsys dot com>
- Date: Wed, 12 Jul 2000 15:39:19 -0700 (PDT)
- Cc: ken at gesn dot com, gcc at gcc dot gnu dot org
> Here is an (probably incomplete, perhaps incorrect) list of vector
> methods that don't depend on the template parameter:
>
> get_allocator
Sorry. This function depends on the template parameter _Alloc because of
specialization; for some specializations there is an allocator object in
each vector, for others there is a static allocator object. But even if
this weren't true, the two versions of this method in the SGI STL are tiny
inline methods.
> 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.
Sorry again. All of the above methods are inline, furthermore, they
are so small that inlining is the correct thing to do even when optimizing
for space.
So it appears that you have identified zero savings.