Boost logo

Boost :

Subject: Re: [boost] [inspect] exceptions (FW: [Boost-users] no exceptions)
From: Gruenke, Matt (mgruenke_at_[hidden])
Date: 2011-03-25 21:58:07


On Fri 3/25/2011 8:51 PM, Emil Dotchevski wrote:

> First, let's get on the same page about the nature of the cost of
> BOOST_THROW_EXCEPTION:
>
> - It adds ~500 lines of C++ code, increasing your compile times.
> Compare this to something as basic as boost/config.hpp, which
> preprocesses to ~47000 lines on my system.

What does that have to do with anything? I mean, depending on what they contain, 500 lines is certainly enough that they *could* have a major effect on code size or compile times, but I didn't attempt to measure that or make any claims along those lines. What I did measure is runtime CPU overhead in a simple throw/catch scenario. The impact BOOST_THROW_EXCEPTION does or doesn't have on compile time and code size doesn't change that.

> Second, consider that this is only the default behavior. All this
> functionality disappears if you #define BOOST_EXCEPTION_DISABLE.

Huh? But that changes the behavior of the code, breaking it in places that depend on exceptions.

I no longer understand where this exchange is going and, not being a decision-maker, it's not clear to me whether/how I can help move this issue to resolution. I presented a concern I had about a proposed change and the findings from my attempts to quantify one such scenario. I can clean up & submit my test program (a tiny thing, really), if others are having difficulty reproducing my results.

Matt




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk