NB's proposed change did not significantly improve performance on three different architectures (NVIDIA A100, AMD MI210, and AMD EPYC).
Changing index_type in extents from a 64-bit type to a 32-bit type did improve performance. That was the change introduced into C++23 by P2553.
The change would require nontrivial wording changes, given preconditions on index_type in the layout mappings. What happens if the index_type in the accessor doesn't match the one in the mapping?
Therefore, we recommend against the NB comment (don't change C++23).
Link to NB comment: https://github.com/cplusplus/nbballot/issues/522
Christian Trott created a benchmark to test the effects of the proposed change.
Link: https://github.com/kokkos/code-examples/tree/main/stdcpp-experiments/mdspan/default_accessor_with_index_type
NB's proposed change did not significantly improve performance on three different architectures (NVIDIA A100, AMD MI210, and AMD EPYC).
Changing
index_type
inextents
from a 64-bit type to a 32-bit type did improve performance. That was the change introduced into C++23 by P2553.The change would require nontrivial wording changes, given preconditions on
index_type
in the layout mappings. What happens if theindex_type
in the accessor doesn't match the one in the mapping?Therefore, we recommend against the NB comment (don't change C++23).