Page MenuHomePhabricator

Speed up check by using a recursive visitor.

Authored by sbenza on May 24 2016, 1:51 PM.



Use a recursive visitor instead of forEachDescendant() matcher.
The latter requires several layers of virtual function calls for each node and
it is more expensive than the visitor.
Benchmark results show improvement of ~6% walltime in clang-tidy.

Diff Detail


Event Timeline

sbenza updated this revision to Diff 58311.May 24 2016, 1:51 PM
sbenza retitled this revision from to Speed up check by using a recursive visitor..
sbenza updated this object.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
alexfh accepted this revision.May 24 2016, 4:10 PM
alexfh edited edge metadata.

LG. Thank you!

25 ↗(On Diff #58311)

nit: clang-format -style=file

This revision is now accepted and ready to land.May 24 2016, 4:10 PM
sbenza updated this revision to Diff 58438.May 25 2016, 9:17 AM
sbenza marked an inline comment as done.
sbenza edited edge metadata.

Reformat code

This revision was automatically updated to reflect the committed changes.