DESCRIPTION FAQ Why is fuzzy matching slow? Example: use Benchmark qw(timethis); use Complete::Util qw(complete_array_elem); # turn off the other non-exact matching methods $Complete::Common::OPT_CI = 0; $Complete::Common::OPT_WORD_MODE = 0; $Complete::Common::OPT_CHAR_MODE = 0; my @ary = ("aaa".."zzy"); # 17575 elems timethis(20, sub { complete_array_elem(array=>\@ary, word=>"zzz") }); results in: timethis 20: 7 wallclock secs ( 6.82 usr + 0.00 sys = 6.82 CPU) @ 2.93/s (n=20) Answer: you will need to install either Text::Levenshtein::Flexible or Text::Levenshtein::XS to speed up fuzzy matching (these modules are declared as optional prereqs). After Text::Levenshtein::Flexible is installed: timethis 20: 1 wallclock secs ( 1.04 usr + 0.00 sys = 1.04 CPU) @ 19.23/s (n=20) ENVIRONMENT COMPLETE_UTIL_TRACE => bool If set to true, will display more log statements for debugging. COMPLETE_UTIL_LEVENSHTEIN => str ('pp'|'xs'|'flexible') Can be used to force which Levenshtein distance implementation to use. The default is to use Text::Levenshtein::Flexible (XS module) that performs the best, then fallback to Text::Levenshtein::XS, then fallback to the included PP implementation (which is about 1-2 orders of magnitude slower). SEE ALSO Complete If you want to do bash tab completion with Perl, take a look at Complete::Bash or Getopt::Long::Complete or Perinci::CmdLine. Other Complete::* modules. Bencher::Scenarios::CompleteUtil