Skip to content

Add multithreading#16

Open
jojojames wants to merge 2 commits into
rustify-emacs:masterfrom
jojojames:master
Open

Add multithreading#16
jojojames wants to merge 2 commits into
rustify-emacs:masterfrom
jojojames:master

Conversation

@jojojames

Copy link
Copy Markdown

usage: jojojames/fussy@a5a7aed

Should be a lot more performant than the single thread version. @jcs090218

- **`Cargo.toml`**: bumped `emacs` 0.11→0.21.0, `fuzzy-matcher` 0.2.1→0.3.7
- **`src/lib.rs`**: removed legacy `extern crate` declarations (implicit since Rust 2018)
- **`src/dynmod.rs`**: replaced the old free-function API (`fuzzy_match_skim(source, pat)`) with the new struct-based API — `SkimMatcherV2::default().fuzzy_match(...)` and `ClangdMatcher::default().fuzzy_match(...)`, both implementing the `FuzzyMatcher` trait
- **Rust toolchain**: updated stable from 1.61.0 → 1.95.0 (had to first remove the removed `rls-preview` component that was blocking the update)
Quick Benchmarks:

(setq random-col (all-completions "" 'help--symbol-completion-table nil))

(benchmark-run 10 (dolist (x random-col)
                    (flx-score x "a")))
(3.630658 46 0.987534)

(benchmark-run 10 (dolist (x random-col)
                    (fussy-fzf-native-score x "a")))
(0.764227 3 0.07255599999999984)

 ;; Handles entire list at once.
(benchmark-run 10 (fzf-native-score-all random-col "a"))
(0.085228 0 0.0)

(benchmark-run 10 (fuz-score-all-clangd random-col "a"))
(0.157088 0 0.0)

(benchmark-run 10 (fuz-score-all-skim random-col "a"))
(0.132644 0 0.0)

(benchmark-run 10 (dolist (x random-col)
                    (fuz-fuzzy-match-skim "a" x)))
(0.703041 2 0.05541699999999983)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant