This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: container<POD> refactoring
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: Joe Buck <Joe dot Buck at synopsys dot COM>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: 20 Sep 2004 13:28:00 -0500
- Subject: Re: container<POD> refactoring
- Organization: Texas A&M University, Department of Computer Science
- References: <20040920112227.A20562@synopsys.com>
Joe Buck <Joe.Buck@synopsys.COM> writes:
| Has anyone done any thinking about adding specializations for avoiding
| bloat with containers of POD types? For std::vector, it seems that all
| of the out-of-line functions other than the == and < operators depend
| only on the size of the POD, and nothing else.
I would say this is something best done at the linker level.
User-codes may detect -- at program source level -- whether we
specialize or not.
I've heard persistent reports that Microsoft's linker is capable (and is
actually doing it) of sharing morally same specializations codes.
|
| Just specializing container<T*> would be easier, and a win for some.
| But a complete job might manage to have one copy, in the library, of
| out-of-line code for almost all container<POD> functions that use the
| default allocator.
--
Gabriel Dos Reis
gdr@cs.tamu.edu
Texas A&M University -- Computer Science Department
301, Bright Building -- College Station, TX 77843-3112