Compute the uppercase search character once per character in has_match(), instead of repeating the conversion while scanning each candidate. This reduces work in fuzzy completion without changing matching or scoring.
Benchmark: five matchfuzzypos() calls per sample, median of seven paired trials with alternating before/after order, pinned to CPU 0. UTF-8, GCC -O2; before a96c3bc1f7, after 06ebf3020d. Path cases use 8,430 tracked files under src/ and runtime/; mixed cases prefix each path with 日本語/, and Unicode-case candidates append /École. Short cases use 5,000 copies of abc. Negative time changes mean faster execution.
| Candidates | Pattern | Before (ms) | After (ms) | Time change |
|---|---|---|---|---|
| Paths | zzzz |
21.037 | 15.369 | -26.9% |
| Paths | cmd |
47.668 | 38.968 | -18.3% |
| Paths | test vim |
110.191 | 90.553 | -17.8% |
| Japanese + paths | 界 |
46.061 | 18.662 | -59.5% |
| Japanese + paths | 日cmd |
60.188 | 50.384 | -16.3% |
Paths + /École |
éco |
130.553 | 101.616 | -22.2% |
| Short, exact match | abc |
22.159 | 22.359 | +0.9% |
| Short, no match | z |
3.467 | 3.110 | -10.3% |
All result lists, match positions, and scores were identical before and after in every trial. Multibyte cases improved in this benchmark; the short exact-match case measured 0.9% slower.
Validation: build passed without warnings; all nine test_matchfuzzy tests and four Test_getcompletion* tests in test_cmdline passed.
https://github.com/vim/vim/pull/21241
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()