On Mon, Jul 28, 2003 at 12:52:31PM -0700, Doug Gregor wrote:
The attached patch implements an aggressive space optimization for
vector, where we share a bit of the vector code for a POD type with
all
other POD types with the same size/alignment. ...
... I'd like to know if this type of optimization is
desired in libstdc++. It uglifies the source a bit, but it can be a
boon to users.
The amount saved for vector, by itself, doesn't seem worth the
obfuscation, but I assume this patch is practice for (e.g.) _Rb_tree,
where the member algorithms are much more substantial, and the savings
proportionally more valuable.
Usually, when the subject arises, it turns to getting the linker to
recognize functions that result in the same sequence of object code,
equating them, and throwing away the extra copies. Is there any
prospect of Apple improving the linking process, instead? (And, in
a way that helps gld systems too? Does macosix use a BSD linker or
GNU ld?)