@@ -39,40 +39,11 @@ there are other ways to obtain this reduction without
3939losing <tt >𝒪 (1)</tt > lookup but it is unclear whether those methods would
4040in fact be faster.
4141<p />
42- Regardless, it is necessary for small types. In all cases <tt >N</tt > is capped by
43- the maximum block capacity defined in the implementation.
44- <p />
4542There is ambiguity as to whether this should result in a change to <tt >hive::insert/emplace</tt >
4643time complexity when discussed on the reflector, as it is unrelated to element numbers (unless
4744all elements fit within one block), but it is related to block capacities, which are defined
4845as part of the `hive` technical specification.
49- <p />
50- The exact mechanism by which erased element locations are recorded (for later reuse
51- <sref ref =" [hive.overview]" /> p3) in `hive` is not specified in the technical
52- specification. The issue is therefore in some ways similar to `deque` `insert/emplace`
53- time complexity, where a `push_back` may in fact result in a <tt >𝒪 (n)</tt >
54- operation in the number of blocks — but because we do not specify the storage
55- mechanism in `deque`, we ignore the fact that deques are typically constructed as
56- vectors of pointers to blocks, and therefore any insert may trigger vector expansion.
57- This was also the reasoning discussed for `hive` during LWG talks, since it can also
58- be implemented as a vector of pointers to blocks.
59- <p />
60- In addition, if we were to support approaches involving bitset stacking, this would
61- also affect functions which can erase elements, since the number of modifications to
62- the bitset-stack of a given block would increase by 1 with every 64x increase (assuming
63- 64-bit words) in block capacity.
6446</p >
65- <blockquote class =" note" >
66- <p >
67- I do not personally believe any wording change are necessary here, based on
68- precedents set by the existing standard and what has been conveyed to me
69- in the past regarding this topic (<tt >𝒪 </tt > complexity within blocks).
70- However reflector discussion on the subject has not been entirely conclusive
71- since the relevance of some time complexity involves a degree of subjectivity.
72- This issue has therefore been submitted in order for a definitive conclusion
73- to be reached on the issue.
74- </p >
75- </blockquote >
7647<p >
7748<b >Changes necessary:</b >
7849<p />
@@ -116,9 +87,7 @@ affect the outcome wording of that issue for `unique`.
11687</p >
11788</blockquote >
11889
119- </discussion >
120-
121- <resolution >
90+ <superseded >
12291<p >
12392This wording is relative to <paper num =" N5014" />.
12493</p >
@@ -372,6 +341,45 @@ at worst <tt>𝒪(log n)</tt> in the capacity of each block containing the
372341
373342</li >
374343
344+ </ol >
345+ </superseded >
346+
347+ <note >2025-09-17; Matt comments and provides improved wording</note >
348+ <p >
349+ Having looked at this in more detail, I believe only a blanket wording change to the
350+ hive.overview is necessary, specifically <sref ref =" [hive.overview]" /> p3, such that
351+ the time complexity is limited to "techniques to identify the memory locations of
352+ erased elements"
353+ </p >
354+ </discussion >
355+
356+ <resolution >
357+ <p >
358+ This wording is relative to <paper num =" N5014" />.
359+ </p >
360+
361+ <ol >
362+
363+ <li ><p >Modify <sref ref =" [hive.overview]" /> as indicated:</p >
364+
365+ <blockquote >
366+ <p >
367+ -1- A `hive` is a type of sequence container that provides constant-time insertion and erasure
368+ operations. Storage is automatically managed in multiple memory blocks, referred
369+ to as element blocks. Insertion position is determined by the container, and may re-use the memory
370+ locations of erased elements.
371+ <p />
372+ -2- [… ]
373+ <p />
374+ -3- Erasures use unspecified techniques <del >of constant time complexity</del > to identify the memory
375+ locations of erased elements, which are subsequently skipped during iteration <ins >in constant time</ins >,
376+ as opposed to relocating subsequent elements during erasure. <ins >These techniques may be at worst
377+ logarithmic in the capacity of the element block erased from.</ins >
378+ </p >
379+ </blockquote >
380+
381+ </li >
382+
375383</ol >
376384</resolution >
377385
0 commit comments