Commit Graph

14 Commits (master)

Author SHA1 Message Date
Junegunn Choi 37dc273148
Micro-optimizations
- Make structs smaller
- Introduce Result struct and use it to represent matched items instead of
  reusing Item struct for that purpose
- Avoid unnecessary memory allocation
- Avoid growing slice from the initial capacity
- Code cleanup
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
Junegunn Choi 8d3a302a17 Simplify Item structure
This commit compensates for the performance overhead from the
extended tiebreak option.
8 years ago
Junegunn Choi 1d2d32c847 Accept comma-separated list of sort criteria 8 years ago
Junegunn Choi 31278bcc68 Fix compatibility issues with OR operator and inverse terms 9 years ago
Junegunn Choi 0ea66329b8 Performance tuning - eager rune array conversion
> wc -l /tmp/list2
     2594098 /tmp/list2

    > time cat /tmp/list2 | fzf-0.10.1-darwin_amd64 -fqwerty > /dev/null

    real    0m5.418s
    user    0m10.990s
    sys     0m1.302s

    > time cat /tmp/list2 | fzf-head -fqwerty > /dev/null

    real    0m4.862s
    user    0m6.619s
    sys     0m0.982s
9 years ago
Junegunn Choi b8904a8c3e Add --tiebreak option for customizing sort criteria
Close #191
9 years ago
Junegunn Choi b431e227da Code cleanup 9 years ago
Junegunn Choi e70a2a5817 Add support for ANSI color codes 9 years ago
Junegunn Choi c1aa5c5f33 Add --tac option and reverse display order of --no-sort
DISCLAIMER: This is a backward incompatible change
9 years ago
Junegunn Choi 9dbf6b02d2 Fix race conditions
- Wait for completions of goroutines when cancelling a search
- Remove shared access to rank field of Item
9 years ago
Junegunn Choi b7bb100810 Improve response time by only looking at top-N items 9 years ago
Junegunn Choi aa05bf5206 Reduce memory footprint 9 years ago
Junegunn Choi f3177305d5 Rewrite fzf in Go 10 years ago