Skip to content

Commit b87f616

Browse files
authored
Merge pull request #10 from alexcu2718/docfix
docs: fix links and update improvements from refactor
2 parents 6d963d0 + cd95bcd commit b87f616

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

IMPROVEMENTS.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ git checkout 27728cdadcd254a95bda48a3f10b6c8d892bea0d
3434
## 2. Filesystem Optimisations
3535

3636
- Implement a more efficient method to exclude ReiserFS - essentially a one-time assertion that isn't repeatedly called
37-
- Consider improved sorting algorithms in `src/printer.rs`
37+
- Consider improved sorting algorithms in `src/util/printer.rs`
3838

3939
- Consider using `statx` on Linux, though this presents some challenges due to `statx` only recently becoming available on MUSL. However, `statx` only requests the attributes explicitly asked for, potentially offering speed benefits as well as additional metadata. This requires careful consideration. See the [Rust implementation](https://github.com/rust-lang/rust/blob/07bdbaedc63094281483c40a88a1a8f2f8ffadc5/library/std/src/sys/fs/unix.rs#L105) for reference.
4040

@@ -79,6 +79,10 @@ Found 3 outliers among 100 measurements (3.00%)
7979

8080
Implement extra functionality such as custom `.fdfignore` files. This shouldn't be particularly difficult to implement. Additional features to be added as requirements arise.
8181

82+
Another one is the wrap any files from printing in quotes, so they can be passed to xargs (if they annoyingly contain spaces...)
83+
84+
Printing additional file metadata on request (like ls)
85+
8286
**Note**: Ideally implemented after the parallelisation restructure below is resolved.
8387

8488
## 5. Parallelisation Restructure
@@ -104,7 +108,7 @@ impl TLSRegex {
104108

105109
## 7. CIFS Filesystem Issue
106110

107-
The `getdents` skip code (in `src/iter.rs` around line 243) encounters issues on certain exotic CIFS filesystems. This was observed on a friend's server setup but hasn't been reproducible since, and access to the original server is no longer available.
111+
The `getdents` skip code [in src/fs/iter.rs](./src/fs/iter.rs#L195) encounters issues on certain exotic CIFS filesystems. This was observed on a friend's server setup but hasn't been reproducible since, and access to the original server is no longer available.
108112

109113
Reverting to the standard `getdents` "call until 0" paradigm resolved the issue and returned the expected results.
110114

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
[![Rust CI](https://github.com/alexcu2718/fdf/workflows/Rust/badge.svg)](https://github.com/alexcu2718/fdf/actions)
44

5-
fdf is a high-performance POSIX file finder written in Rust with extensive C FFI. It serves as a lightweight alternative to tools such as fd and find, with a focus on speed, efficiency, and cross-platform compatibility. Benchmarks demonstrate fdf running up to 2x faster than comparable tools, achieved through low-level optimisation, SIMD techniques, and direct kernel interfacing.
5+
fdf is a high-performance POSIX file finder written in Rust with extensive C FFI.
6+
7+
It serves as a lightweight alternative to tools such as fd and find, with a focus on speed, efficiency, and cross-platform compatibility. Benchmarks demonstrate fdf running up to 2x faster than comparable tools, achieved through low-level optimisation, SIMD techniques, and direct kernel interfacing.
68

79
PLEASE NOTE: This is due to undergo a rename before a 1.0
810

@@ -125,7 +127,7 @@ To avoid issues, use --same-file-system when traversing symlinks. Both fd and fi
125127

126128
### Key Optimisations
127129

128-
- **getdents64: Optimised the Linux/Android-specific directory reading by significantly reducing the number of getdents system calls. This approach enables single-pass reads for small directories and reduces getdents invocations by roughly 50% in testing. See the skip code(or follow link) [in src/iter.rs](./src/iter.rs#L195)**
130+
- **getdents64: Optimised the Linux/Android-specific directory reading by significantly reducing the number of getdents system calls. This approach enables single-pass reads for small directories and reduces getdents invocations by roughly 50% in testing. See the skip code(or follow link) [in src/fs/iter.rs](./src/fs/iter.rs#L195)**
129131

130132
- **find_char_in_word/find_last_char_in_word**: Locates the first/last occurrence of a byte in a 64-bit word using SWAR (SIMD within a register), implemented as a const function
131133

@@ -135,7 +137,7 @@ To avoid issues, use --same-file-system when traversing symlinks. Both fd and fi
135137

136138
The following function provides an elegant solution to avoid branch mispredictions/SIMD instructions during directory entry parsing (a performance-critical loop):
137139

138-
Check source code for further explanation [in src/utils.rs](./src/utils.rs#L195)**
140+
Check source code for further explanation [in utils.rs](./src/util/utils.rs#L195)**
139141

140142
```rust
141143
// Computational complexity: O(1) - truly constant time
@@ -222,7 +224,7 @@ I additionally emailed the author of memchr and got some nice tips, great guy, s
222224

223225
### Feature Enhancements (Planned)
224226

225-
More elaborate improvements discussed [at this link]( ./IMPROVEMENTS.md )
227+
More elaborate improvements/fixes discussed [at this link]( ./IMPROVEMENTS.md )
226228

227229
**API cleanup, currently the CLI is the main focus but I'd like to fix that eventually!**
228230

0 commit comments

Comments
 (0)