The semantic checking that verifies whether an Objective-C method
declared in a subclass has consistent parameter types with a method having the same selector in a superclass performs a significant number of lookups into the class hierarchy. In the example in <rdar://problem/11004361>, we spend 4.7% of -fsyntax-only time in these lookups. Optimize away most of the calls to this routine (Sema::CompareMethodParamsInBaseAndSuper) by first checking whether we have ever seen *any* method with that selector (using the global selector table). Since most selectors are unique, we can avoid the cost of this name lookup in many cases, for a 3.3% speedup. llvm-svn: 155958
Loading
Please register or sign in to comment