njames93 added a comment.

In D125026#3519831 <https://reviews.llvm.org/D125026#3519831>, 
@LegalizeAdulthood wrote:

> Just for my own edification, how did you know/suspect that a pure visitor 
> would be faster than matchers?

Mainly cause the fact we are creating 2 matcher expressions that differ by a 
bool value for each pattern, a visitor can easily handle both cases in one go.
There's also overhead with ASTMatchers that for simple cases sometimes may not 
be worth it.
It's not all good news though, there's a cost associated with running another 
ASTTraversal, however as we already have a visitor in this check we don't pay 
for that cost again.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125026/new/

https://reviews.llvm.org/D125026

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to