cplusplus / papers

ISO/IEC JTC1 SC22 WG21 paper scheduling and management
636 stars 18 forks source link

P2846 R3 reserve_hint: Eagerly reserving memory for not-quite-sized lazy ranges #1549

Open wg21bot opened 1 year ago

wg21bot commented 1 year ago

P2846R0 size_hint: Eagerly reserving memory for not-quite-sized lazy ranges (Corentin Jabot)

inbal2l commented 1 year ago

SG9 (Ranges) reviewed P846R0 during the Varna meeting on 2023-06-12 (Full Minutes).

Polls

POLL: The standard needs to clearly define where size_hint should be called

SF F N A SA
0 2 0 3 2

Outcome: Weak consensus against

# Of Authors: 1

Author’s Position: WF

Attendance: 9

WF: We’re unsure what’s the recommendation (both said “very weakly in favor”)

SA: Performance hints should be hints


POLL: Prefer approximate_size over size_hint (for consistency with the concept name, approximately_sized_range)

F N A
3 2 2

Outcome: No consensus

# Of Authors: 1

Author’s Position: F

Attendance: 9


POLL: Modify the paper to include suggested guidance, make sized_range to subsume approximately_sized_range (assuming non breaking change), and forward “P2846R0: size_hint: Eagerly reserving memory for not-quite-sized lazy ranges” to LEWG for C++26.

SF F N A SA
3 3 1 0 0

Attendance: 9

# of Authors: 1

Author Position: SF

Outcome: Strong Consensus in Favour

Summary

The paper needs to apply the following updates:

  1. Capture the implementation options (includes: mandating a call to size_hint (taking side effects into consideration), defining loosened requirements without mandating the use, or allowing implementations to ignore size_hint) - to be determined by LEWG
  2. rename size_hint to: approximately_sized_range

And move the revised paper to LEWG for C++26

wg21bot commented 1 year ago

P2846R1 size_hint: Eagerly reserving memory for not-quite-sized lazy ranges (Corentin Jabot)

ben-craig commented 8 months ago

2024-01-16 Library Evolution Telecon

P2846R1: size_hint: Eagerly reserving memory for not-quite-sized lazy ranges

2024-01-16 Library Evolution Telecon Minutes

Champion: Corentin Jabot

Chair: Ben Craig

Minute Taker: Mark Hoemmen

Summary

__POLL: P2846 (size_hint: Eagerly reserving memory for not-quite-sized lazy ranges) needs max, min and approximate facilities, and not just a single number.__

SF F N A SA
1 0 4 4 7

Attendance: 18

# of Authors: 1

Author's Position: SA

Outcome: Consensus against

Next Steps

Research idea of unconditional size hint on views like take

Discuss some of the names brought up in the meeting, reserve_hint, min_reserve

Next time, look at modifications, consider impl defined or otherwise for vector's use of sized hint, then look at wording.

wg21bot commented 4 months ago

P2846R2 reserve_hint: Eagerly reserving memory for not-quite-sized lazy ranges (Corentin Jabot)

FabioFracassi commented 2 months ago

2024-07-23 Library Evolution Telecon

P2846R2: reserve_hint: Eagerly reserving memory for not-quite-sized lazy ranges

2024-07-23 Library Evolution Telecon Minutes

Champion: Corentin Jabot Chair: Fabio Fracassi Minute Taker: Ben Craig

Summary

Papers Forwarding Checklist:

  1. Why should this utility go into the standard library? - Customization point for standard facilities / optimization opportunity
  2. Examples? - Yes
  3. Discussion of prior art? - Yes
  4. Implementation experience? - No
  5. Usage experience? - No
  6. Deployment experience? - No
  7. Performance considerations? - Yes, with benchmarks
  8. Changes Library Evolution previously requested? - N/A
  9. Support in "std::format" and "hash" (if required)? - N/A
  10. Feature test macro? - Yes, but needs correction
  11. Freestanding? - N/A
  12. Constexpr? - Yes
  13. Wording? - Partial, not checked

POLL: Require the use of the reserve_hint in the range constructor of vector and string in P2846R2

SF F N A SA
2 6 2 0 2

Attendance: 18 # of Authors: 1 Author's Position: SA Outcome: consensus in favour

SA:

Next Steps

Next revision will be seen by LEWG

wg21bot commented 1 week ago

P2846R3 reserve_hint: Eagerly reserving memory for not-quite-sized lazy ranges (Corentin Jabot)