Boost logo

Boost :

Subject: Re: [boost] Requesting formal review for (Boost) LEAF
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2019-01-10 07:01:28


On Wed, Jan 9, 2019 at 4:41 AM Niall Douglas via Boost <
boost_at_[hidden]> wrote:

> But it *could* be the case that compilers wouldn't suck so bad in the
> future. That said, Outcome was specifically designed for today's
> compilers with all their failings. It was not designed for hypothetical
> future compilers.
>

I have not done benchmarking on LEAF but there are probably many toy
examples where LEAF will work a lot faster than Outcome, and others that
would be the other way around. If we are fair, we'd admit that none of them
matter if a library in practice doesn't cause performance problems (read:
doesn't show up high in the profile.)

(If you doubt this, consider that when an error object is transported over
many stack frames, LEAF does exactly one move, which is always done
statically regardless of the function signature, except when it isn't done
at all, which is the case when the program doesn't need that particular
error object in that particular case. Best case for returning errors
coupled with the return object is O(N).


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