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

@@ -2259,9 +2259,7 @@ func postProcessOptions(opts *Options) {
theme.Spinner = boldify(theme.Spinner)
}
if opts.Scheme != "default" {
processScheme(opts)
}
processScheme(opts)
}
func expectsArbitraryString(opt string) bool {