<div dir="ltr">On Thu, Sep 12, 2013 at 7:55 PM, Howard Hinnant <span dir="ltr"><<a href="mailto:howard.hinnant@gmail.com" target="_blank" class="cremed">howard.hinnant@gmail.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On Sep 12, 2013, at 10:51 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" class="cremed">chandlerc@google.com</a>> wrote:<br>
<br>
> On Thu, Sep 12, 2013 at 6:23 PM, Howard Hinnant <<a href="mailto:howard.hinnant@gmail.com" class="cremed">howard.hinnant@gmail.com</a>> wrote:<br>
>> Please commit with these changes, and thanks much.  Nice job!<br>
>><br>
> I'm not sure it is worth it...<br>
><br>
><br>
>> Clang team:  If we don't have at least some stack support by Chicago, I may recommend removing dynarray for lack of implementation experience.  I'm seeking feedback from the clang team on that course of action.  If I hear from you that such support is no problem and I'm just being a nervous nanny, I'll back down.  But if we're still figuring out how to do this, and no one else has either, then color me nervous nanny.  dynarray is not worthy of standardization without stack support.<br>

>><br>
> Speaking from both the Clang and LLVM side: I don't think we know what we want to have to put things on the stack, and I am confident we won't have it by Chicago. There are big, nasty, hard to answer questions in the space of compiler-aided variable sized stack allocation. Currently on x86 with LLVM, if the size is variable and you have a reasonably fast malloc library, putting dynarray on the stack will often be a pessimization. I'm not sure how often we can make variable sized stack allocation the right choice, but it will at the least require some reasonably significant changes to LLVM's optimizer itself.<br>

><br>
> Even then, I currently expect that small vector, or a standard allocator that pulls initially from a fixed-size stack-based pool, will be significantly faster, and the only reason for having dynarray at all was performance! Considering how hard it is to implement, I'm inclined currently to go back to the committee with the lesson "it's really hard, and it won't even be faster. can we just stick with vector?"<br>

<br>
</div></div>Ok.<br>
<br>
Sorry Marshall.  Great job, but hold off on the commit.  I think we need to sort this out.<br></blockquote><div><br></div><div>Jumping up a few layers of context...</div><div><br></div><div>I'm actually fine checking in dynarray with a heap-only implementation. If anything, so that we can demonstrate more fully that yes, we implemented everything, and shockingly enough found problems. If the problems persuade the committee to reconsider dynarray for C++14, wonderful. But it doesn't seem unreasonable to track the draft as it progresses...</div>
</div></div></div>