fuzzywuzzy icon indicating copy to clipboard operation
fuzzywuzzy copied to clipboard

Optimized fuzz.py

Open rahul-nath opened this issue 9 years ago • 2 comments

Simplified logic using De Morgan's Laws. Combined some lines to reduce string concatenation costs and make coding decisions more uniform. Hope they help.

rahul-nath avatar Sep 16 '16 06:09 rahul-nath

Sorry for not looking at this sooner. Is this a speed optimization, and if so, do you have benchmarks?

josegonzalez avatar Nov 01 '16 19:11 josegonzalez

@josegonzalez It's a line count optimisation. However in my opinion at least the string joining hurts readability.

maxbachmann avatar Dec 16 '20 17:12 maxbachmann