Commit Graph

5 Commits (master)

Author SHA1 Message Date
Junegunn Choi c9f16b6430
Avoid unconditionally storsing input as runes
When --with-nth is used, fzf used to preprocess each line and store the
result as rune array, which was wasteful if the line only contains ascii
characters.
7 years ago
Junegunn Choi 9e85cba0d0
Reduce memory footprint of Item struct 7 years ago
Junegunn Choi d9c8a9a880
[perf] Remove memory copy when using string delimiter 8 years ago
Junegunn Choi ddc7bb9064
[perf] Optimize AWK-style tokenizer for --nth
Approx. 50% less memory footprint and 40% improvement in query time
8 years ago
Junegunn Choi 1d4057c209
[perf] Avoid allocating rune array for ascii string
In the best case (all ascii), this reduces the memory footprint by 60%
and the response time by 15% to 20%. In the worst case (every line has
non-ascii characters), 3 to 4% overhead is observed.
8 years ago