Skip to content

Commit 85c6964

Browse files
committed
release: v4.0.0
1 parent 4269838 commit 85c6964

File tree

9 files changed

+94
-27
lines changed

9 files changed

+94
-27
lines changed

CHANGELOG.md

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,79 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [4.0.0] - 2026-03-10
9+
10+
### Changes
11+
12+
`sk` is now beating `fzf` in interactive matching for time, peak memory usage and CPU usage ! See the benchmarks below for details, including a brief explanation of the benchmark itself.
13+
14+
This release brings multiple breaking changes, please read the following if you have doubts about the update.
15+
16+
#### Default to the Arinae matcher
17+
18+
The biggest change of them all is that the default algorithm is now `Arinae`, skim's latest and most performant algorithm, featuring typo-resistance. If you want to keep using `SkimV2`, pass `--algo skim_v2` and please take the time to open an issue explaining why if possible.
19+
This also makes the `--scheme` option available to the default matcher, allowing for more refined matching scenarii.
20+
21+
#### Default to non-typo resistant
22+
23+
Typo-resistant behavior is now disable by default, add `--typos` to your skim invocation or `SKIM_DEFAULT_OPTIONS` to get it back. Unless you were using the `frizbee`, `fzy` or `arinae` matcher, this should not impact you.
24+
25+
#### Removal of the `skim_v1` algorithm
26+
27+
The `SkimV1` algorithm, skim's initial algorithm, has been deprecated for years now, and it has now been removed.
28+
29+
#### SkimItem index (library only)
30+
31+
`SkimItem::get_index` and `SkimItem::set_index` are gone, and all index handling is now done internally.
32+
33+
### Benchmarks
34+
35+
This benchmarks runs the interactive interface in a tmux session, and waits for the UI to stabilize.
36+
It uses a 10 million path-like ASCII items input file, and the query `test`.
37+
38+
```
39+
=== Results: sk v4.0.0 [baseline] ===
40+
Completed runs: 50 / 50
41+
Average items matched: 2895782 / 10000000 (min: 2895782, max: 2895782)
42+
Average time: 3.827s (min: 3.576s, max: 4.090s)
43+
Average items/second: 2615767 (min: 2445033, max: 2796365)
44+
Average peak memory usage: 1589.2 MB (min: 1518.6 MB, max: 1661.2 MB)
45+
Average peak CPU usage: 528.9% (min: 457.0%, max: 740.0%)
46+
47+
=== Results: sk v3.7.0 ===
48+
Completed runs: 50 / 50
49+
Average items matched: 2895782 / 10000000 (min: 2895782, max: 2895782) +0.0%
50+
Average time: 3.930s (min: 3.565s, max: 4.226s) +2.7%
51+
Average items/second: 2548674 (min: 2366263, max: 2804816) -2.6%
52+
Average peak memory usage: 1618.8 MB (min: 1539.1 MB, max: 1680.6 MB) +1.9%
53+
Average peak CPU usage: 696.8% (min: 608.0%, max: 875.0%) +31.7%
54+
55+
=== Results: fzf 0.70.0 ===
56+
Completed runs: 50 / 50
57+
Average items matched: 2895782 / 10000000 (min: 2895782, max: 2895782) +0.0%
58+
Average time: 5.421s (min: 4.814s, max: 6.111s) +41.7%
59+
Average items/second: 1848269 (min: 1636444, max: 2077385) -29.3%
60+
Average peak memory usage: 2015.3 MB (min: 1860.7 MB, max: 2173.9 MB) +26.8%
61+
Average peak CPU usage: 1301.1% (min: 1229.0%, max: 1431.0%) +146.0%
62+
63+
=== Comparison Summary (vs baseline: sk v4.0.0) ===
64+
Binary Avg time Δ time Avg rate Δ rate
65+
------------------------------------------------------------------------------
66+
sk v4.0.0 3.827s baseline 2615767 baseline
67+
sk v3.7.0 3.930s +2.7% 2548674 -2.6%
68+
fzf 0.70.0 5.421s +41.7% 1848269 -29.3%
69+
```
70+
71+
### 🚀 Features
72+
73+
- [**breaking**] Internally compute indexes at match time (removes get/set_index) (#1001)
74+
- [**breaking**] Use Arinae as default algorithm
75+
76+
### ⚙️ Miscellaneous Tasks
77+
78+
- [**breaking**] Default to disabled typos
79+
- Use python for bench script for comparison
80+
881
## [3.7.0] - 2026-03-08
982

1083
This adds a new library API: `Skim::run_items`. Using this, you don't need to send the items, the library handles it for you.
@@ -40,8 +113,6 @@ let res = Skim::run_with(options, ["foo", "bar"]);
40113

41114
It will automatically convert any iterator of <impl SkimItem> by adding an `index` field and then send it, before running skim.
42115

43-
44-
45116
### 🚀 Features
46117

47118
- Add `scheme` for better filepath matching in Arinae

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "skim"
3-
version = "3.7.0"
3+
version = "4.0.0"
44
authors = ["Loric ANDRE", "Zhang Jinzhou <lotabout@gmail.com>"]
55
description = "Fuzzy Finder in rust!"
66
documentation = "https://docs.rs/skim"

man/man1/sk.1

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.ie \n(.g .ds Aq \(aq
22
.el .ds Aq '
3-
.TH sk 1 "sk 3.7.0"
3+
.TH sk 1 "sk 4.0.0"
44
.ie \n(.g .ds Aq \(aq
55
.el .ds Aq '
66
.SH NAME
@@ -79,11 +79,11 @@ Run in exact mode
7979
\fB\-\-regex\fR
8080
Start in regex mode instead of fuzzy\-match
8181
.TP
82-
\fB\-\-algo\fR \fI<ALGORITHM>\fR [default: skim_v2]
82+
\fB\-\-algo\fR \fI<ALGORITHM>\fR [default: arinae]
8383
Fuzzy matching algorithm
8484

85-
skim_v2 Latest skim algorithm, should be better in almost any case
86-
skim_v1 Legacy skim algorithm
85+
arinae (ari) Latest algorithm
86+
skim_v2 Legacy skim algorithm
8787
clangd Used in clangd for keyword completion
8888
fzy Algorithm from fzy (https://github.com/jhawthorn/fzy)
8989
.br
@@ -92,17 +92,15 @@ fzy Algorithm from fzy (https://github.com/jhawthorn/fzy)
9292
\fIPossible values:\fR
9393
.RS 14
9494
.IP \(bu 2
95-
skim_v1: Original skim fuzzy matching algorithm (v1)
96-
.IP \(bu 2
97-
skim_v2: Improved skim fuzzy matching algorithm (v2, default)
95+
skim_v2: Improved skim fuzzy matching algorithm (v2)
9896
.IP \(bu 2
9997
clangd: Clangd fuzzy matching algorithm
10098
.IP \(bu 2
10199
fzy: Fzy matching algorithm (https://github.com/jhawthorn/fzy)
102100
.IP \(bu 2
103101
frizbee: Frizbee matching algorithm, typo resistant
104102
.IP \(bu 2
105-
arinae: Arinae: typo\-resistant & natural algorithm
103+
arinae: Arinae: typo\-resistant & natural algorithm, default
106104
.RE
107105
.TP
108106
\fB\-\-case\fR \fI<CASE>\fR [default: smart]
@@ -122,7 +120,7 @@ ignore: Case\-insensitive matching
122120
smart: Smart case: case\-insensitive unless query contains uppercase
123121
.RE
124122
.TP
125-
\fB\-\-typos\fR [\fI<TYPOS>\fR] [default: smart]
123+
\fB\-\-typos\fR [\fI<TYPOS>\fR] [default: disabled]
126124
Enable typo\-tolerant matching
127125

128126
When passed without a value (\-\-typos), uses adaptive formula (pattern_length / 4). When passed with a value (e.g. \-\-typos=2), uses that exact number as the maximum allowed typos. \-\-typos=0 explicitly disables typo tolerance. Applies to both fzy and frizbee matchers.
@@ -1062,4 +1060,4 @@ When using `sk \-\-remote`, pipe in action chains (see the KEYBINDS section), fo
10621060
.ie \n(.g .ds Aq \(aq
10631061
.el .ds Aq '
10641062
.SH VERSION
1065-
v3.7.0
1063+
v4.0.0

shell/completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ _sk() {
6262
return 0
6363
;;
6464
--algo)
65-
COMPREPLY=($(compgen -W "skim_v1 skim_v2 clangd fzy frizbee arinae" -- "${cur}"))
65+
COMPREPLY=($(compgen -W "skim_v2 clangd fzy frizbee arinae" -- "${cur}"))
6666
return 0
6767
;;
6868
--case)

shell/completion.fish

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ pathname\t''
1414
complete -c sk -s n -l nth -d 'Fields to be matched' -r
1515
complete -c sk -l with-nth -d 'Fields to be transformed' -r
1616
complete -c sk -s d -l delimiter -d 'Delimiter between fields' -r
17-
complete -c sk -l algo -d 'Fuzzy matching algorithm' -r -f -a "skim_v1\t'Original skim fuzzy matching algorithm (v1)'
18-
skim_v2\t'Improved skim fuzzy matching algorithm (v2, default)'
17+
complete -c sk -l algo -d 'Fuzzy matching algorithm' -r -f -a "skim_v2\t'Improved skim fuzzy matching algorithm (v2)'
1918
clangd\t'Clangd fuzzy matching algorithm'
2019
fzy\t'Fzy matching algorithm (https://github.com/jhawthorn/fzy)'
2120
frizbee\t'Frizbee matching algorithm, typo resistant'
22-
arinae\t'Arinae: typo-resistant & natural algorithm'"
21+
arinae\t'Arinae: typo-resistant & natural algorithm, default'"
2322
complete -c sk -l case -d 'Case sensitivity' -r -f -a "respect\t'Case-sensitive matching'
2423
ignore\t'Case-insensitive matching'
2524
smart\t'Smart case: case-insensitive unless query contains uppercase'"

shell/completion.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module completions {
55
}
66

77
def "nu-complete sk algorithm" [] {
8-
[ "skim_v1" "skim_v2" "clangd" "fzy" "frizbee" "arinae" ]
8+
[ "skim_v2" "clangd" "fzy" "frizbee" "arinae" ]
99
}
1010

1111
def "nu-complete sk case" [] {

shell/completion.zsh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ _sk() {
2323
'*--with-nth=[Fields to be transformed]:WITH_NTH:_default' \
2424
'-d+[Delimiter between fields]:DELIMITER:_default' \
2525
'--delimiter=[Delimiter between fields]:DELIMITER:_default' \
26-
'--algo=[Fuzzy matching algorithm]:ALGORITHM:((skim_v1\:"Original skim fuzzy matching algorithm (v1)"
27-
skim_v2\:"Improved skim fuzzy matching algorithm (v2, default)"
26+
'--algo=[Fuzzy matching algorithm]:ALGORITHM:((skim_v2\:"Improved skim fuzzy matching algorithm (v2)"
2827
clangd\:"Clangd fuzzy matching algorithm"
2928
fzy\:"Fzy matching algorithm (https\://github.com/jhawthorn/fzy)"
3029
frizbee\:"Frizbee matching algorithm, typo resistant"
31-
arinae\:"Arinae\: typo-resistant & natural algorithm"))' \
30+
arinae\:"Arinae\: typo-resistant & natural algorithm, default"))' \
3231
'--case=[Case sensitivity]:CASE:((respect\:"Case-sensitive matching"
3332
ignore\:"Case-insensitive matching"
3433
smart\:"Smart case\: case-insensitive unless query contains uppercase"))' \

shell/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.0
1+
4.0.0

0 commit comments

Comments
 (0)