[llvm] [utils][filecheck-lint]: speedup filecheck_lint (PR #94191)

Benjamin Chetioui via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 03:38:59 PDT 2024


================
@@ -228,7 +237,8 @@ def find_best_match(typo):
         )
 
     potential_directives = find_potential_directives(content)
-
+    # cache score and best_match to skip recalculating
+    checked_potential_directives = dict()
----------------
bchetioui wrote:

nit: it's not super obvious to me what this variable contains based on its name.

How about `score_and_best_match_for_potential_directive`? (A bit of a mouthful.)

https://github.com/llvm/llvm-project/pull/94191


More information about the llvm-commits mailing list