<div dir="ltr">What I meant is the choice is based on the implementation&#39;s reasoning on how runtime indexing should be done. Basically, it wont choose between deque or vector, it will choose one that is fit for runtime indexing and stick to it. Currently, what It sticks to is efficient only for space since the main goal is to provide compile time indexing.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Apr 17, 2026 at 6:44 PM Jason McKesson via Std-Proposals &lt;<a href="mailto:std-proposals@lists.isocpp.org">std-proposals@lists.isocpp.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Apr 17, 2026 at 9:37 AM Muneem via Std-Proposals<br>
&lt;<a href="mailto:std-proposals@lists.isocpp.org" target="_blank">std-proposals@lists.isocpp.org</a>&gt; wrote:<br>
&gt;<br>
&gt; 1. I am not stating that book keeping is obligatory, but rather the implementation has that choice to make, and as we know the implementation knows more than us.<br>
<br>
This is fallacious reasoning. Compilers can know a lot, but they<br>
cannot know everything. And the performance implications of object<br>
layout cannot be fully known without a global analysis of how you&#39;re<br>
using the object. Which compilers *cannot* do.<br>
<br>
Even if they could, compilers cannot see code you haven&#39;t written yet,<br>
so that answer can change. It also cannot see code other people have<br>
written, so it has to make a decision without being able to see *any*<br>
of the code&#39;s usage.<br>
<br>
You&#39;re effectively saying that a compiler can tell whether a<br>
`deque&lt;T&gt;` or a `vector&lt;T&gt;` would be the better implementation to use<br>
for a given `T`, so `vector&lt;T&gt;` should be able to pick which<br>
implementation internally that it uses based on `T`.<br>
-- <br>
Std-Proposals mailing list<br>
<a href="mailto:Std-Proposals@lists.isocpp.org" target="_blank">Std-Proposals@lists.isocpp.org</a><br>
<a href="https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals" rel="noreferrer" target="_blank">https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals</a><br>
</blockquote></div>

