[PATCH v2 0/8] libstdc++: Sequence of improvements to <mdspan>.
Luc Grosheintz
luc.grosheintz@gmail.com
Mon Aug 4 11:07:56 GMT 2025
Hi Tomasz,
Thank you for the review! Sorry about the missing parens, even after
"Ctrl+F"ing each of the emails I can't find the requires clause (the
two I found both need the parens).
Do you think it's possible to merge this series before the other two
outstanding patch series? There's some risk of collision; making changes
to this patch series is much more time consuming than rebasing (and
retesting the other two patch series).
Thank you,
Luc
On 8/4/25 12:43, Tomasz Kaminski wrote:
> Hi,
>
> I this time I made a quick pass through all changes, before commenting on
> first commits,
> and they look solid to me, and I haven't noticed anything I would like to
> change (except parentheses
> around requires, but I will handle that locally). I will try to do a full
> review during this week.
>
> Regards,
> Tomasz
>
> On Sun, Aug 3, 2025 at 10:59 PM Luc Grosheintz <luc.grosheintz@gmail.com>
> wrote:
>
>> The combined effect of this sequence of change is:
>>
>> * a reduction in the number of template instantiations, by
>> - avoiding needless dependency of IndexType,
>> - special formulas for low-rank extents,
>> - special formulas for (nearly) fully dynamic extents.
>>
>> * improved code quality, by
>> - precomputing partial products of the static extents,
>> - special cases for low-rank extents,
>> - rewriting the condition E[i] == dynamic_extent in a more
>> optimizer friendly manner.
>> - effectively loop-unrolling extents::operator==.
>>
>> While simplistic micro-benchmarking shows the effectiveness of these
>> changes, likely the stronger argument is presented in each commit:
>> a) each change removes needless complexity,
>> b) before/after examples of generated code show the effectiveness.
>>
>> Luc Grosheintz (8):
>> libstdc++: Reduce template instantiations in <mdspan>.
>> libstdc++: Precompute products of static extents.
>> libstdc++: Improve low-rank layout_{left,right}::stride.
>> libstdc++: Improve fully dynamic extents in mdspan.
>> libstdc++: Improve nearly fully dynamic extents in mdspan.
>> libstdc++: Reduce indirection in extents::extent.
>> libstdc++: Improve extents::operator==.
>> libstdc++: Replace numeric_limit with __int_traits in mdspan.
>>
>> libstdc++-v3/include/std/mdspan | 282 +++++++++++++-----
>> .../mdspan/extents/class_mandates_neg.cc | 3 +
>> 2 files changed, 208 insertions(+), 77 deletions(-)
>>
>> --
>> 2.50.0
>>
>>
>
More information about the Libstdc++
mailing list