diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2020-11-19 14:24:24 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2020-11-19 14:58:48 +0100 |
commit | 90aab73f8d6b5fd0a8adb706c8ae669564f23c56 (patch) | |
tree | 08e62c3c7a97b0c6b531a70785b26b8f4505ae79 /lisp/password-cache.el | |
parent | 74a35d16e25bdb07d847b980008fc4d25ab9404e (diff) | |
download | emacs-90aab73f8d6b5fd0a8adb706c8ae669564f23c56.tar.gz emacs-90aab73f8d6b5fd0a8adb706c8ae669564f23c56.tar.bz2 emacs-90aab73f8d6b5fd0a8adb706c8ae669564f23c56.zip |
More string-search optimisations
All-ASCII strings cannot have substrings with non-ASCII characters in
them; use this fact to avoid searching entirely.
* src/fns.c (Fstring_search): For multibyte non-ASCII needle and
unibyte haystack, don't check if the haystack is all-ASCII; it's a
waste of time. For multibyte non-ASCII needle and multibyte
all-ASCII haystack, fail immediately.
* test/src/fns-tests.el (string-search): Add more test cases.
Diffstat (limited to 'lisp/password-cache.el')
0 files changed, 0 insertions, 0 deletions