Skip to content

Commit 8f50d1a

Browse files
authored
Merge pull request #13 from LyonSyonII/dev
Release 3.0.0
2 parents 2292a2c + debe7cb commit 8f50d1a

File tree

10 files changed

+252
-122
lines changed

10 files changed

+252
-122
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## \[3.0.0]
6+
7+
### 🚀 Features - Breaking Changes
8+
- `--ignore` can now skip files/directories with a specific name, instead of just paths.
9+
- Breaking change, semantics are not the same as previous version, though it shouldn't affect much.
10+
- Addresses [#12](https://github.com/LyonSyonII/hunt-rs/issues/12).
11+
-
12+
### 🐛 Bug Fixes
13+
- `--ignore` now has the exact same behaviour regardless of the `--canonicalize` flag.
14+
515
## \[2.4.0]
616

717
### 🚀 Features

Cargo.lock

+15-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+9-8
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ repository = "https://github.com/LyonSyonII/hunt-rs"
66
keywords = ["algorithms", "filesystem"]
77
readme = "README.md"
88
license = "MIT"
9-
version = "2.4.0"
9+
version = "3.0.0"
1010
authors = ["Liam G <liam.garriga@tutanota.com>"]
1111
edition = "2021"
12+
rust-version = "1.74.1"
1213

1314
[package.metadata.wix]
1415
upgrade-guid = "93301563-2D91-4224-B838-C60D235011A0"
@@ -17,13 +18,13 @@ license = false
1718
eula = false
1819

1920
[dependencies]
20-
clap = { version = "4.5.2", features = ["derive", "color"] } # Command line argument parser
21+
clap = { version = "4.5.20", features = ["derive", "color"] } # Command line argument parser
2122
colored = "2.1.0" # Colored output
22-
rayon = "1.9.0" # Parallelism library
23-
crossbeam-channel = "0.5.12" # Faster channels (mpmc)
24-
mimalloc = { version = "0.1.39", default-features = false } # Faster allocator
23+
rayon = "1.10.0" # Parallelism library
24+
crossbeam-channel = "0.5.13" # Faster channels (mpmc)
25+
mimalloc = { version = "0.1.43", default-features = false } # Faster allocator
2526
thin_str = "0.1.0" # Thinner string (only 8 bytes)
26-
memchr = { version = "2.7.1", features = ["std", "alloc"] } # Small substring search optimization
27+
memchr = { version = "2.7.4", features = ["std", "alloc"] } # Small substring search optimization
2728
inquire = { version = "0.7.5" } # Multiselect CLI interface
2829

2930
# Multithreaded fine-grained profiler
@@ -33,10 +34,10 @@ features = ["rayon", "attributes"]
3334
default-features = false
3435

3536
[target.'cfg(target_os = "linux")'.dependencies]
36-
rustix = { version = "0.38.31", default-features = false, features = ["fs", "alloc"] }
37+
rustix = { version = "0.38.34", default-features = false, features = ["fs", "alloc"] }
3738

3839
[target.'cfg(windows)'.dependencies]
39-
winapi-util = "0.1.6"
40+
winapi-util = "0.1.8"
4041

4142
[profile.release]
4243
lto = true

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ Seeing how `find` did not perform any parallelism at all, I decided to make a mu
161161
Hunt is multithreaded, so it's a lot faster than `find`, and more reliable than `locate` (recent files cannot be found with it).
162162

163163
## Installation
164+
[![Packaging status](https://repology.org/badge/vertical-allrepos/hunt-find.svg)](https://repology.org/project/hunt-find/versions)
164165
### Precompiled binaries
165166
Download the latest binary from [releases](https://github.com/lyonsyonii/hunt-rs/releases).
166167

benchmarks/run

+88-20
Original file line numberDiff line numberDiff line change
@@ -10,55 +10,123 @@ cmd profile() {
1010
}
1111

1212
sub bench {
13-
const build = cargo build --release
14-
const hunt = ../target/release/hunt
15-
const fd = fd --unrestricted --color=never
13+
const build = "cp ../target/release/hunt ./hunt-prev; cargo build --release"
14+
const hunt = "../target/release/hunt"
15+
const prev = "./hunt-prev" // previous hunt version
16+
const 2_3 = "./hunt-2.3.0"
17+
const fd = "fd --unrestricted --color=never"
18+
19+
cmd all() {
20+
run bench 1;
21+
run bench 2;
22+
run bench 3;
23+
run bench 4;
24+
run bench 5;
25+
run bench 6;
26+
}
1627

1728
/// Search one file in ~/
1829
cmd 1() {
1930
$build;
20-
HUNT="$hunt --hidden --first --exact SomeFile $HOME";
31+
CMD="--hidden --first --exact SomeFile $HOME"
32+
HUNT="$hunt $CMD";
33+
HUNT_PREV="$prev $CMD";
34+
HUNT2_3="$2_3 $CMD";
2135
FD="$fd --max-results=1 SomeFile $HOME";
22-
# FIND="find $HOME -name SomeFile -print -quit";
23-
hyperfine -N --warmup 100 --ignore-failure \
24-
"$FD" \
36+
FIND="find $HOME -name SomeFile -print -quit";
37+
38+
hyperfine -N --warmup 1 --ignore-failure \
2539
"$HUNT" \
26-
# "$FIND"
40+
"$HUNT2_3" \
41+
"$FD" \
42+
"$FIND";
43+
# "$HUNT_PREV" \
2744
}
2845

2946
/// Search multiple files in ~/
3047
cmd 2() {
3148
$build;
32-
HUNT="hunt --hidden SomeFile $HOME";
33-
HUNT2="$hunt --hidden SomeFile $HOME";
49+
CMD="--hidden SomeFile $HOME";
50+
HUNT="$hunt $CMD";
51+
HUNT2_3="$2_3 $CMD";
52+
HUNT_PREV="$prev $CMD";
3453
FD="$fd SomeFile $HOME";
35-
# FIND="find $HOME -name SomeFile -print";
54+
FIND="find $HOME -name SomeFile -print";
55+
3656
hyperfine -N --warmup 1 --ignore-failure \
37-
"$FD" \
3857
"$HUNT" \
39-
"$HUNT2"
40-
# "$FIND"
58+
"$HUNT2_3" \
59+
"$FD" \
60+
"$FIND" \
61+
# "$HUNT_PREV" \
4162
}
4263

4364
/// Search multiple files in /
4465
cmd 3() {
4566
$build;
46-
HUNT="hunt --hidden SomeFile /";
47-
HUNT2="$hunt --hidden SomeFile /";
67+
CMD="--hidden SomeFile /";
68+
HUNT="$hunt $CMD";
69+
HUNT2_3="$2_3 $CMD";
70+
HUNT_PREV="$prev $CMD";
4871
FD="$fd SomeFile /";
72+
4973
hyperfine -N --warmup 1 --ignore-failure \
50-
"$FD" \
5174
"$HUNT" \
52-
"$HUNT2"
75+
"$HUNT2_3" \
76+
"$FD" \
77+
# "$HUNT_PREV" \
5378
}
5479

5580
/// Search all files in ~/
5681
cmd 4() {
5782
$build;
58-
HUNT="$hunt --hidden -ss $HOME";
5983
FD="$fd . $HOME";
84+
CMD="--hidden -ss $HOME";
85+
HUNT="$hunt $CMD";
86+
HUNT2_3="$2_3 $CMD";
87+
HUNT_PREV="$prev $CMD";
88+
6089
hyperfine -N --warmup 1 --ignore-failure \
90+
"$HUNT" \
91+
"$HUNT2_3" \
6192
"$FD" \
62-
"$HUNT"
93+
# "$HUNT_PREV" \
94+
}
95+
96+
/// Different task depths
97+
cmd 5() {
98+
$build;
99+
D="HUNT_MAX_DEPTH"
100+
HUNT="$hunt --hidden --ends .nix flake $HOME"
101+
102+
hyperfine --warmup 1 --ignore-failure \
103+
"$D=0 $HUNT" \
104+
"$D=1 $HUNT" \
105+
"$D=10 $HUNT" \
106+
"$D=100 $HUNT" \
107+
"$D=200 $HUNT" \
108+
"$D=300 $HUNT" \
109+
"$D=400 $HUNT" \
110+
"$D=500 $HUNT" \
111+
"$D=1000 $HUNT" \
112+
"$D=2000 $HUNT"
113+
}
114+
115+
/// Startup time (empty directory)
116+
cmd 6() {
117+
$build;
118+
mkdir empty;
119+
HUNT="$hunt";
120+
HUNT2_3="$2_3";
121+
FD="fd";
122+
FIND="find $HOME -name SomeFile -print";
123+
124+
hyperfine -N --ignore-failure \
125+
"$HUNT empty" \
126+
"$HUNT2_3 empty" \
127+
"$FD empty" \
128+
"$FIND empty";
129+
130+
rmdir empty;
63131
}
64132
}

flake.lock

+16-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)