mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-06 07:58:34 +08:00
Add fast path for two-character patterns in FuzzyMatchV2
For two ASCII characters, rows 0 and 1 of the score matrix collapse to scalar running state, so Phase 2 and Phase 3 fuse into one pass with no score arrays. withPos stores the two rows for the backtrace. Up to 1.4x on two-char queries, the most common multi-char length. Verify both fast paths against the general algorithm with exhaustive (every short string over a class-complete alphabet) and fuzz tests, runnable via the new make fuzz target.
This commit is contained in:
+4
-2
@@ -3,8 +3,10 @@ CHANGELOG
|
||||
|
||||
0.74.2
|
||||
------
|
||||
- Single-character queries are up to 2.4x faster
|
||||
- This is the most latency-sensitive case; the first keystroke scans the entire list before the result cache can help
|
||||
- Performance optimizations for short queries
|
||||
- The most critical case: fzf narrows results as you type, so short queries scan the largest candidate sets and the first keystroke scans the whole input.
|
||||
- Single-character queries are up to 2.4x faster
|
||||
- Two-character queries are up to 1.4x faster
|
||||
- Faster sorting of search results; the default two-criteria ranking skips redundant radix passes
|
||||
- Fixed nondeterministic match highlight positions
|
||||
- fzf now detects terminal resize on Windows in `--height` mode (#4790) (@Cyrus580529)
|
||||
|
||||
Reference in New Issue
Block a user