Subject: Re: [boost] [Boost-users] [afio] Formal review of Boost.AFIO
From: John Bytheway (jbytheway+boost_at_[hidden])
Date: 2015-08-26 10:41:19
On 2015-08-25 10:47, Niall Douglas wrote:
> On 25 Aug 2015 at 16:32, Andreas SchÃ¤fer wrote:
>>>> I'm still unsure what "51 opcodes <= Value transport <= 32 opcodes" is
>>>> supposed to mean.
>>> Min/max code bloat for a monad<int> or future<int>.
>> So the minimum is 51 and the maximum is 32?
> Correct. That non-sensical outcome is due to definition. The minimum
> code bloat _should_ result from a known-memory outcome where the
> compiler knows for a fact memory has some value, and therefore can
> prune branching down to no code output at all. The maximum code bloat
> is where memory has unknown state, and therefore the compiler must
> generate all possible branches for that unknown state.
> Compiler optimisers are not as deterministic as perhaps they should
> be, so you get this weird outcome where the compiler generates more
> bloat for the known case than the unknown case. Which is a compiler
> optimiser bug, strictly speaking.
In this case perhaps you should document these differently. Label the
two values for what they are, rather than using misleading inequalities;
Code bloat when memory known: 51
Code bloat when memory unknown: 32
(and each case should ideally link to the source code you're using to
measure this bloat so someone who needs to understand the details can do
so, or at least link back to the definitions).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk