Boost logo

Boost :

Subject: Re: [boost] Review request for variant2, review manager wanted
From: Peter Dimov (lists_at_[hidden])
Date: 2019-02-25 15:18:26


John Elvind Helset reports (via Slack) that
results in significant runtime improvement on both g++ and Clang, to the
point where Boost.Variant consistently outperforms both variant2 and
std::variant on this specific benchmark.

Looking at the code, it seems to me that the switch statement is always
unrolled to the default of 20 even when the variant doesn't have as many
alternatives, which causes Clang to refuse to inline the visitation and
results in a performance loss.

Boost list run by bdawes at, gregod at, cpdaniel at, john at