From c4a927ca8dc383190d5df2cacd3f966698b6190c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 10 Jul 2016 18:24:27 +0200 Subject: [PATCH] patch 7.4.2019 Problem: When ignoring case utf_fold() may consume a lot of time. Solution: Optimize for ASCII. --- src/mbyte.c | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) 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 @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2019, /**/ 2018, /**/ -- 2.50.1