Improve search performance by pre-calculating character classes

This simple optmization can give more than 15% performance boost
in some scenarios.
This commit is contained in:
Junegunn Choi
2024-04-13 16:11:18 +09:00
parent 5643a306bd
commit 7ce6452d83
3 changed files with 28 additions and 21 deletions

View File

@@ -9,6 +9,10 @@ import (
"github.com/junegunn/fzf/src/util"
)
func init() {
Init("default")
}
func assertMatch(t *testing.T, fun Algo, caseSensitive, forward bool, input, pattern string, sidx int, eidx int, score int) {
assertMatch2(t, fun, caseSensitive, false, forward, input, pattern, sidx, eidx, score)
}