Date: Sat, 18 Apr 2026 21:02:03 -0700
On Saturday, 18 April 2026 20:32:58 Pacific Daylight Time Jason McKesson via
Std-Proposals wrote:
> Note that if you're actually going to do benchmarking, your tests need
> to consider the entire package. That is, you cannot *just* test
> runtime indexing performance. You do more with tuples than just
> indexing them. They're value types; they get copied a lot. A fair
> benchmark must look into the slowdown caused by having to copy the
> larger, book-keeping object compared to a proper `std:tuple`. That is,
> you need to answer the question of how much runtime indexing relative
> to copying must you do before the savings (if any) from book-keeping
> exceeds the cost due to copying.
>
> "Large tuples" are not exactly common, so profiling needs to show at
> what size scale having bookkeeping information becomes overall better
> than not doing bookkeeping.
The benchmark should probably be close to a real-world scenario of where it
would be used.
Which three weeks into the discussion, I still don't know what would be. Why
does anyone need runtime indexing of tuples? Why does anyone need
heterogeneous lists? And how do you choose the index?
Std-Proposals wrote:
> Note that if you're actually going to do benchmarking, your tests need
> to consider the entire package. That is, you cannot *just* test
> runtime indexing performance. You do more with tuples than just
> indexing them. They're value types; they get copied a lot. A fair
> benchmark must look into the slowdown caused by having to copy the
> larger, book-keeping object compared to a proper `std:tuple`. That is,
> you need to answer the question of how much runtime indexing relative
> to copying must you do before the savings (if any) from book-keeping
> exceeds the cost due to copying.
>
> "Large tuples" are not exactly common, so profiling needs to show at
> what size scale having bookkeeping information becomes overall better
> than not doing bookkeeping.
The benchmark should probably be close to a real-world scenario of where it
would be used.
Which three weeks into the discussion, I still don't know what would be. Why
does anyone need runtime indexing of tuples? Why does anyone need
heterogeneous lists? And how do you choose the index?
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2026-04-19 04:02:09
