Boost logo

Boost :

From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2020-06-02 09:32:32


>>>> - Does LEAF incur any memory or runtime performance overhead in the
>>>> non-error case? If so what is the impact of this when compared to the
>>>> itanium zero-cost exception handling ABI?
>>>>
>>> Generally, no.
>> Can you elaborate on this with regards to runtime performance?
>>
>> In the successful case, the runtime overhead of C++ try-catch blocks is
>> a jump over the catch block.
> By "generally no" I meant that the work is mostly limited to try_catch.
>
> In more details, on the happy path::
>
> - At try_catch: a local tuple<slot<E>...> is initialized, where E... is
> basically the argument types of all the error handlers, with duplicates
> removed. Each slot<E> zeroes an int, and a TLS pointer for each of E... is
> set to point the corresponding slot<E>... . When exiting the try_catch,
> this is undone.
>
> - Things like preload cache all their arguments locally, by moving, later
> to be discarded if no error has occurred.
Doesn't this state the opposite of "generally, no" or am I missing anything?
If I understand this correctly, in all cases (so also in the happy case)
a tuple is initialized. The slot<> class sounds like an optional, so the
"int"s to be zeroed are not contiguous, similar with the TLS pointer.
Not sure how trivial initializing the latter is but this sounds like
(stack) memory and runtime overhead.
So I think the request for a comparison of the happy cases for LEAF and
exceptions is justified.




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