tonybaloney / perflint

Python Linter for performance anti patterns
MIT License
659 stars 10 forks source link

loop-invariant-global-usage example appears to be measuring dict key lookup #18

Open justin-mccann opened 2 years ago

justin-mccann commented 2 years ago

The README example for W8202: Global name usage in a loop (loop-invariant-global-usage) appears to be measuring the cost of dictionary lookup more than global-vs-local names. From looking in the anti-patterns repository, I think it's just using the wrong code sample.