<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Apr 14, 2013, at 10:51 AM, jahanian <<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Is there anecdotal evidence of speed improvement (other than the obvious multiple iteration removal)?<br></div></blockquote><div><br></div><div>I'm doing measurements using libclang, which is a heavy user of that function.</div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>- fariborz<br><br>On Apr 12, 2013, at 6:04 PM, Argyrios Kyrtzidis <<a href="mailto:akyrtzi@gmail.com">akyrtzi@gmail.com</a>> wrote:<br><br><blockquote type="cite">Author: akirtzidis<br>Date: Fri Apr 12 20:04:01 2013<br>New Revision: 179436<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=179436&view=rev">http://llvm.org/viewvc/llvm-project?rev=179436&view=rev</a><br>Log:<br>Speed-up ObjCMethodDecl::getOverriddenMethods().<br><br>Use an newly introduce ASTContext::getBaseObjCCategoriesAfterInterface() which caches its<br>results instead of re-calculating the categories multiple times.<br><br>Modified: cfe/trunk/lib/AST/ASTContext.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=179436&r1=179435&r2=179436&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=179436&r1=179435&r2=179436&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/AST/ASTContext.cpp (original)<br>+++ cfe/trunk/lib/AST/ASTContext.cpp Fri Apr 12 20:04:01 2013<br>@@ -1127,8 +1127,8 @@ void ASTContext::getOverriddenMethods(<br> assert(D);<br><br> if (const CXXMethodDecl *CXXMethod = dyn_cast<CXXMethodDecl>(D)) {<br>-    Overridden.append(CXXMethod->begin_overridden_methods(),<br>-                      CXXMethod->end_overridden_methods());<br>+    Overridden.append(overridden_methods_begin(CXXMethod),<br>+                      overridden_methods_end(CXXMethod));<br>   return;<br> }<br><br>@@ -1141,6 +1141,39 @@ void ASTContext::getOverriddenMethods(<br> Overridden.append(OverDecls.begin(), OverDecls.end());<br>}<br><br>+void ASTContext::getBaseObjCCategoriesAfterInterface(<br>+  </blockquote></div></blockquote></div><br></body></html>