forked from aniani/vim
patch 7.4.2019
Problem: When ignoring case utf_fold() may consume a lot of time. Solution: Optimize for ASCII.
This commit is contained in:
@@ -3067,6 +3067,9 @@ utf_convert(
|
||||
int
|
||||
utf_fold(int a)
|
||||
{
|
||||
if (a < 0x80)
|
||||
/* be fast for ASCII */
|
||||
return a >= 0x41 && a <= 0x5a ? a + 32 : a;
|
||||
return utf_convert(a, foldCase, (int)sizeof(foldCase));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user