diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-10 18:24:27 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-10 18:24:27 +0200 |
commit | c4a927ca8dc383190d5df2cacd3f966698b6190c (patch) | |
tree | 0a81c918cb5fa69ed8f90b8365db247353c442a7 | |
parent | b25f9a97e9aad3cbb4bc3fe87cdbd5700f8aa0c6 (diff) | |
download | vim-git-c4a927ca8dc383190d5df2cacd3f966698b6190c.tar.gz |
patch 7.4.2019v7.4.2019
Problem: When ignoring case utf_fold() may consume a lot of time.
Solution: Optimize for ASCII.
-rw-r--r-- | src/mbyte.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 49057000f..7bc184ba2 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -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)); } diff --git a/src/version.c b/src/version.c index 7317edf21..8013b459d 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2019, +/**/ 2018, /**/ 2017, |