Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-09-05 14:45:05

"Iain K. Hanson" <iain.hanson_at_[hidden]> writes:

> dynamic_cast needs rtti afaik, at least on some compilers e.g. Sun.
> My mention of incurring cost was to MI over SI. a quick test shows that
> throwing a exception using MI and virtual bases with gcc with
> -O4 produces an assemblers file more than twice the size of of the same
> program using SI exceptions only. With a line count difference of nearly
> exactly double.
> That is a significant overhead for every exception.

Where is the overhead? Compile time? Runtime? Static data? Size of
intermediate assembly file ;-> ?

>> >>
>> >> > Also, I'm not sure that this use case is sufficiently common to burden
>> >> > all exceptions with.
>> >>
>> >> What's the burden?
>> >>
>> >> I'm just askin', is all.
>> >
>> > Space and time overhead. There are still people out there who will not
>> > use exceptions for performance reasons ( perceived or real ). Anything
>> > we do that increases the cost will give them further excuse.
>> That's their choice. I don't think Boost should cater to incorrect
>> assumptions of inefficiency.
>>From the above, it is not an incorrect assumption.

Your analysis was a bit too thin to be convincing.

Dave Abrahams
Boost Consulting

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