Boost logo

Boost :

From: Mattias Flodin (flodin_at_[hidden])
Date: 2002-10-25 03:22:05

On Thu, Oct 24, 2002 at 11:58:26PM -0700, Andrei Alexandrescu wrote:
> I don't claim I'm a guru, but I am trying to drive this issue to the max. I
> am mildly surprised that some people pretend that that's not a problem. As
> the many recent posts on the subject prove it: the issue can't be tuned out
> of existence.

Yes, at the risk of drawing accusations onto my person of being
redundant, I'll just say that I definitely agree with Andrei and others
on this.

Regardless of how low the price of a byte is, I know a lot of end users
do care about size. And it just doesn't feel right when I have a program
that's 80 kb, to add a library that is 500 kb.

The question is what can be done about it. I don't really believe that
the regexp code is written in a way that can't be compiled into
something smaller. Most of the blame is probably on the compilers, which
could do a much better job at merging identical functions and optimizing
for size. I know that g++ has given me big headaches in the past, with
hilariously redundant code: hundreds of instructions serving no purpose
at all (e.g. assigning zero multiple times to registers that are never
even used). A functor implementation I made, similar to Boost.Function,
required 120-130 instructions for the ctor in g++ but only 20-30
instructions to do the same thing in MSVC 7.

(And yes, I did compile with -Os)

Mattias Flodin <flodin_at_[hidden]>  -
Room NADV 102
Department of Computing Science
Umeå University
S-901 87 Umeå, Sweden
"Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former. " -- Albert Einstein

Boost list run by bdawes at, gregod at, cpdaniel at, john at