Boost logo

Boost :

Subject: Re: [boost] [convert] Performance
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-06-10 16:55:14


On Wednesday 11 June 2014 06:46:53 Vladimir Batov wrote:
>
> And indeed BOOST_ASSERT seems to be heavier than BOOST_TEST due to
> expression-validity check done with
>
> __builtin_expect(expr, 1)

It's not a validity check, it's a hint to the compiler to help branch
prediction. Assertion failures are assumed to be improbable.

In any case, when testing performance you should be building in release mode,
where all asserts are removed.


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