<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 21, 2009, at 1:56 PM, Daniel Dunbar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Ok. Are you able/willing to investigate or should I try to con someone<br>else into it?<br><br> - Daniel<br><br></div></blockquote><div><br></div>Daniel, thanks for staying on top of this issue.</div><div><br><blockquote type="cite"><div>On Wed, Jan 21, 2009 at 1:33 PM, Sebastian Redl<br><<a href="mailto:sebastian.redl@getdesigned.at">sebastian.redl@getdesigned.at</a>> wrote:<br><blockquote type="cite">Daniel Dunbar wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">My performance tester is pointing at this for a 2.5% regression in<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">syntax only time.  Is this inherent and the price we have to pay for<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">cleanup, or unexpected?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite">Unexpected. I do some very rough performance testing on every bunch I<br></blockquote><blockquote type="cite">convert and never notice a slowdown. There is an inherent price (the<br></blockquote><blockquote type="cite">smart pointers carry around a pointer to the Action all the time), but I<br></blockquote><blockquote type="cite">expected it to be unnoticeable.<br></blockquote><blockquote type="cite"><br></blockquote></div></blockquote><div><br></div><div>Sebastian, when we decided to move forward with this, we agreed it was important to do "A/B comparisons" (see below). By analogy, this pattern needs to be like "0-cost" exceptions (where entering a block is 0-cost). Parsing valid code should be 0-cost (or darn close to it).</div></div><div><br></div><div>Thanks for understanding our performance goals,</div><div><br></div><div>snaroff</div><div><br></div><div><div>Begin forwarded message:</div><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: normal normal normal 12px/normal Helvetica; color: rgb(0, 0, 0); "><b>From: </b></font><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">steve naroff <<a href="mailto:snaroff@apple.com">snaroff@apple.com</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: normal normal normal 12px/normal Helvetica; color: rgb(0, 0, 0); "><b>Date: </b></font><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">December 19, 2008 8:35:13 AM PST</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: normal normal normal 12px/normal Helvetica; color: rgb(0, 0, 0); "><b>To: </b></font><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">clang-dev Developers <<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: normal normal normal 12px/normal Helvetica; color: rgb(0, 0, 0); "><b>Subject: </b></font><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><b>Smart pointer usage in the Parser/Actions</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div></div><div>Folks,<br><br>Over the past week or so, there's been some discussion about making extensive use of smart pointers in the parser (on clang-dev).<br><br>Since the change is pervasive (and influences the programming model), we discussed the topic yesterday (with Apple compiler engineers working on clang).<br><br>We concluded it makes sense to follow-through with the changes. Our only concern is performance: we don't want to degrade performance of parsing correct code. For example, parsing system headers remains a bottleneck. Since system headers don't contain invalid code, it's important this improvement not degrade performance. Once the change is complete, it's important we do "A/B comparisons" to measure the performance for parsing valid code.<br><br>Once we have the data, we can decide if the cost is worth the benefit. We don't anticipate a major slowdown, however given the scope of the change (and frequency of calling "move"), it's something we need to verify.<br><br>We'd like to thank Sebastian for tackling this project!<br><br>snaroff<br></div><div><br></div></blockquote><blockquote type="cite"><div><blockquote type="cite">Sebastian<br></blockquote><blockquote type="cite"><br></blockquote>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></div></blockquote></div><br></body></html>