To: vim_dev@googlegroups.com Subject: Patch 7.4.2019 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2019 Problem: When ignoring case utf_fold() may consume a lot of time. Solution: Optimize for ASCII. Files: src/mbyte.c *** ../vim-7.4.2018/src/mbyte.c 2016-06-26 17:53:02.814756926 +0200 --- src/mbyte.c 2016-07-10 17:28:29.992454245 +0200 *************** *** 3067,3072 **** --- 3067,3075 ---- 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)); } *** ../vim-7.4.2018/src/version.c 2016-07-10 18:21:45.728884145 +0200 --- src/version.c 2016-07-10 18:22:50.675918919 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2019, /**/ -- hundred-and-one symptoms of being an internet addict: 265. Your reason for not staying in touch with family is that they do not have e-mail addresses. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///