aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/StringRef.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-10-19 19:39:10 +0000
committerDouglas Gregor <dgregor@apple.com>2010-10-19 19:39:10 +0000
commit93910a5a59f3171cecec458b203127862d0cee2b (patch)
treeee72ce9a9cf84c8e726dfc2a2606bace3afd9fba /llvm/lib/Support/StringRef.cpp
parentee8d15157adbababaf925aed754a812105f247d4 (diff)
downloadllvm-93910a5a59f3171cecec458b203127862d0cee2b.zip
llvm-93910a5a59f3171cecec458b203127862d0cee2b.tar.gz
llvm-93910a5a59f3171cecec458b203127862d0cee2b.tar.bz2
Improve the performance of typo correction, by using a simple
computation to compute the lower bound of the edit distance, so that we can avoid computing the edit distance for names that will clearly be rejected later. Since edit distance is such an expensive algorithm (M x N), this leads to a 7.5x speedup when correcting NSstring -> NSString in the presence of a Cocoa PCH. llvm-svn: 116849
Diffstat (limited to 'llvm/lib/Support/StringRef.cpp')
0 files changed, 0 insertions, 0 deletions