summaryrefslogtreecommitdiff
path: root/src/match.c
Commit message (Collapse)AuthorAge
* Check for too long haystackJohn Hawthorn2020-08-08
| | | | Fixes #145
* Avoid VLA in tty_interfaceJohn Hawthorn2019-12-27
|
* Remove strlen in precompute_bonusJohn Hawthorn2019-12-27
| | | | Pretty sure this was optimized out anyways, but this is cleaner IMO.
* Use malloc in match_positions to avoid VLAJohn Hawthorn2019-12-27
|
* Remove DEBUG_VERBOSEJohn Hawthorn2019-12-27
|
* Reduce memory and avoid VLA in match()John Hawthorn2019-12-27
| | | | | When we're matching without recording positions, we only need to keep two rows in memory at a time.
* Split match and match_postitionsJohn Hawthorn2019-12-27
|
* Extract row matching into own methodJohn Hawthorn2019-12-27
|
* Move some temporary storage into match_structJohn Hawthorn2019-12-27
|
* Break early if strlen(neddle) > strlen(haystack)John Hawthorn2019-12-27
| | | | | This should never happen if this is called properly (match only returns valid results if there IS a match), but it's nice to double check here.
* Combine early-return if as else ifJohn Hawthorn2019-12-27
|
* Work with row pointersJohn Hawthorn2019-12-27
|
* Avoid VLA for match_bonusJohn Hawthorn2019-12-27
|
* Avoid VLA for lower_{needle,haystack}John Hawthorn2019-12-27
|
* Precompute tolower in match_positionsJohn Hawthorn2018-10-13
| | | | | | | | | | | | | | | This makes match_positions significantly faster on MacOS by calling tolower() O(N) times instead of O(N*N) Before: $ time ./fzy -e linux --benchmark < linux_files.txt ./fzy -e linux --benchmark < linux_files.txt 13.24s user 0.03s system 381% cpu 3.483 total After: $ time ./fzy -e linux --benchmark < linux_files.txt ./fzy -e linux --benchmark < linux_files.txt 4.57s user 0.02s system 381% cpu 1.204 total
* Use standards-compliant lookup tableJohn Hawthorn2016-07-12
|
* Use a lookup table for precompute_bonusesJohn Hawthorn2016-07-10
|
* Don't consider numbers word separatorsJohn Hawthorn2016-07-10
| | | | | | This made sense on paper when deciding what was a "word". However in reality this is rarely an indication of a separate word. I've found that this caused hexadecimal or base64 strings to be favoured in matches.
* Split bonus computation into own methodJohn Hawthorn2016-07-10
|
* Change match into if/elseJohn Hawthorn2016-06-22
| | | | | This is marginally faster and I still think it reads very well (maybe better).
* Remove calculate_score (same as match_positions)John Hawthorn2016-06-08
|
* Move equality detection within calculate_scoreJohn Hawthorn2016-06-08
|
* Move sources into src directoryJohn Hawthorn2016-05-21