This is an archive of the discontinued LLVM Phabricator instance.

Speed up hasName() matcher.
ClosedPublic

Authored by sbenza on Oct 14 2014, 9:04 AM.

Details

Summary

Speed up hasName() matcher by skipping the expensive generation of the
fully qualified name unless we need it.
In the common case of matching an unqualified name, we don't need to
generate the full name. We might not even need to copy any string at
all.
This change speeds up our clang-tidy benchmark by ~10%

Diff Detail

Event Timeline

sbenza updated this revision to Diff 14871.Oct 14 2014, 9:04 AM
sbenza retitled this revision from to Speed up hasName() matcher..
sbenza updated this object.
sbenza edited the test plan for this revision. (Show Details)
sbenza added a reviewer: klimek.
sbenza added a subscriber: Unknown Object (MLST).
klimek accepted this revision.Oct 15 2014, 4:23 AM
klimek edited edge metadata.

lg

This revision is now accepted and ready to land.Oct 15 2014, 4:23 AM
sbenza closed this revision.Oct 15 2014, 8:09 AM
sbenza updated this revision to Diff 14943.

Closed by commit rL219792 (authored by @sbenza).