79568787

Date: 2025-04-11 11:59:22
Score: 0.5
Natty:
Report link

After reading @康桓瑋's answer I actually figured out the pattern behind the table, which corroborates what they wrote.

  1. Every iterator is 8 bytes bigger than the last, because it contains the previous iterator plus an extra pointer to the view for accessing function object.
  2. filter_view increases by the size of the iterator due to having to cache the begin. Likely it is actually the previous iterator plus a cache flag padded to pointer size.
  3. transform_view does not increase because it does not have to cache anything.
  4. MSVC matches this, but also grows each view by additional 16 bytes. Perhaps those are some debug counters or pointers that would disappear with right compiler flags.
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @康桓瑋's
  • Self-answer (0.5):
Posted by: Dominik Kaszewski