<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 11, 2014 at 7:02 AM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":f3m" class="a3s" style="overflow:hidden">Author: alp<br>
Date: Fri Jul 11 09:02:04 2014<br>
New Revision: 212816<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=212816&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=212816&view=rev</a><br>
Log:<br>
raw_svector_ostream: grow and reserve atomically<br>
<br>
Including the scratch buffer size in the initial reservation eliminates the<br>
subsequent malloc+move operation and offers a healthier constant growth with<br>
less memory wastage.</div></blockquote></div></div><br><div>What benchmarks did you run to measure the memory waste, and what were the numbers? I think it is really important to provide these kinds of details with potentially performance impacting changes like this.</div>
<div><br></div><div>I also think it would have been better to provide those details in a pre-commit review so that other users of LLVM could let you know if their use cases differ significantly and would therefore have significantly different performance tradeoffs. No need to revert the patch (others can chime in on this review thread if it matters to them) but for future reference when changing the Support libraries.</div>
<div><br></div><div>-Chandler</div></div>