Skip to content

v1.0.0 initial release

Compare
Choose a tag to compare
@charlievieth charlievieth released this 03 Mar 03:34
· 49 commits to master since this release
2eb2d27

v1.0.0

This is the initial release of github.com/charlievieth/fastwalk.

commit 2eb2d27
Author: Charlie Vieth [email protected]
Date: Wed Mar 2 22:14:37 2022 -0500

README: update and add examples

commit 0d4cb3e
Author: Charlie Vieth [email protected]
Date: Wed Mar 2 20:22:01 2022 -0500

darwin: implement readdir_r and closedir instead of linking to the stdlib

commit 1d9075e
Author: Charlie Vieth [email protected]
Date: Wed Mar 2 20:15:58 2022 -0500

README: update with new Darwin perf numbers (now 2x faster)

commit 5daeaef
Author: Charlie Vieth [email protected]
Date: Wed Mar 2 20:09:16 2022 -0500

Correctly follow symlinks, fix adapter funcs, fix Windows tests

This also tunes DefaultNumWorkers for macOS/Darwin which results in a
22% speed up:
```
name         old time/op    new time/op    delta
FastWalk-10    16.8ms ± 1%    13.0ms ± 2%  -22.20%  (p=0.008 n=5+5)

name         old alloc/op   new alloc/op   delta
FastWalk-10    2.13MB ± 0%    2.14MB ± 0%     ~     (p=0.151 n=5+5)

name         old allocs/op  new allocs/op  delta
FastWalk-10     37.7k ± 0%     37.7k ± 0%   -0.01%  (p=0.016 n=5+5)
```

commit 8d5c8bb
Author: Charlie Vieth [email protected]
Date: Wed Mar 2 11:51:36 2022 -0500

README: update and add example

commit a206b5c
Author: Charlie Vieth [email protected]
Date: Fri Feb 25 20:22:26 2022 -0500

export StatDirEntry

The StatDirEntry can be used to get the results of os.Stat for a
DirEntry.

commit f0398be
Author: Charlie Vieth [email protected]
Date: Fri Feb 25 19:52:28 2022 -0500

unix: uncomment line in test

commit cec9408
Author: Charlie Vieth [email protected]
Date: Fri Feb 25 19:41:52 2022 -0500

remove unused testdata folder

commit 77fe7e3
Author: Charlie Vieth [email protected]
Date: Fri Feb 25 19:35:38 2022 -0500

unix: consolidate unix (non-macOS) specific files

commit abcbda0
Author: Charlie Vieth [email protected]
Date: Fri Feb 25 19:29:37 2022 -0500

linux: speed up direntNamlen

commit 7c6327a
Author: Charlie Vieth [email protected]
Date: Fri Feb 25 17:14:37 2022 -0500

Use fs.DirEntry and fs.FileInfo instead of os.DirEntry and os.FileInfo

commit 674cbf6
Author: Charlie Vieth [email protected]
Date: Fri Feb 25 17:10:45 2022 -0500

darwin: improve readDir test coverage

commit 128e4e1
Author: Charlie Vieth [email protected]
Date: Fri Feb 25 16:49:57 2022 -0500

dirent: cache Stat results for portableDirent

commit a4a3f4b
Author: Charlie Vieth [email protected]
Date: Fri Feb 25 16:10:26 2022 -0500

tests: fix TestEntryFilter on Windows

commit a8a7f0d
Author: Charlie Vieth [email protected]
Date: Thu Feb 24 22:35:39 2022 -0500

Add README

commit 1e61d29
Author: Charlie Vieth [email protected]
Date: Thu Feb 24 20:44:39 2022 -0500

EntryFilter: use multiple entry stores to reduce lock contention

```
benchmark                                      old ns/op     new ns/op     delta
BenchmarkEntryFilter_Seen-10                   30.8          33.4          +8.41%
BenchmarkEntryFilter_Seen_Parallel-10          130           60.4          -53.58%
BenchmarkEntryFilter/MostlyHits-10             41.7          48.6          +16.51%
BenchmarkEntryFilter/MostlyHitsParallel-10     132           71.2          -45.89%
BenchmarkEntryFilter/HalfMisses-10             115           135           +17.54%
```

commit 4e8a8c4
Author: Charlie Vieth [email protected]
Date: Thu Feb 24 20:39:53 2022 -0500

Makefile: only run nogetdirentries test on darwin

commit d9fb580
Author: Charlie Vieth [email protected]
Date: Thu Feb 24 20:38:39 2022 -0500

Makefile: fix bench_comp target

commit 62ed6f4
Author: Charlie Vieth [email protected]
Date: Wed Feb 23 13:32:23 2022 -0500

rename seen_* entry_filter_*

commit 221012d
Author: Charlie Vieth [email protected]
Date: Wed Feb 23 12:21:47 2022 -0500

darwin: fixup build tags on zsyscall_*getdirentries* files

commit a3a6465
Author: Charlie Vieth [email protected]
Date: Wed Feb 23 12:19:32 2022 -0500

remove lstatDirent as it's no longer needed since we cache the result

commit 2e6a1b8
Author: Charlie Vieth [email protected]
Date: Tue Feb 22 17:08:59 2022 -0500

Add Makefile and benchmark script

commit 2940440
Author: Charlie Vieth [email protected]
Date: Tue Feb 22 14:53:41 2022 -0500

benchmark fastwalk against filepath.WalkDir and godirwalk.Walk

Below results from a 2021 M1 MacBook Pro.

filepath vs. fastwalk:
```
name               old time/op    new time/op    delta
WalkComparison-10    30.8ms ± 0%    17.4ms ± 1%  -43.43%  (p=0.008 n=5+5)

name               old alloc/op   new alloc/op   delta
WalkComparison-10    4.33MB ± 0%    2.14MB ± 0%  -50.64%  (p=0.008 n=5+5)

name               old allocs/op  new allocs/op  delta
WalkComparison-10     50.9k ± 0%     37.7k ± 0%  -26.00%  (p=0.008 n=5+5)
```

godirwalk vs. fastwalk:
```
name               old time/op    new time/op    delta
WalkComparison-10    59.2ms ± 1%    17.4ms ± 1%  -70.63%  (p=0.008 n=5+5)

name               old alloc/op   new alloc/op   delta
WalkComparison-10    25.2MB ± 0%     2.1MB ± 0%  -91.54%  (p=0.008 n=5+5)

name               old allocs/op  new allocs/op  delta
WalkComparison-10     57.6k ± 0%     37.7k ± 0%  -34.58%  (p=0.016 n=4+5)
```

commit 581a6f5
Author: Charlie Vieth [email protected]
Date: Tue Feb 22 14:19:40 2022 -0500

darwin: don't export Getdirentries function

commit e64e8db
Author: Charlie Vieth [email protected]
Date: Tue Feb 22 14:16:24 2022 -0500

DirEntry: cache results on unix and ensure fastwalk.DirEntry is always used

This commit changes the unix DirEntry implementation to cache the
results of Info() and Stat(). It also ensures that the fs.DirEntry
passed to WalkFunc is always a fastwalk.DirEntry, which has an extra
Stat() method.

commit 69596e8
Author: Charlie Vieth [email protected]
Date: Sat Jan 29 02:34:45 2022 -0500

fastwalk: skip ErrPermission test on Windows

TODO: create an applicable test for Windows

commit cffabdf
Author: Charlie Vieth [email protected]
Date: Sat Jan 29 02:16:20 2022 -0500

github: remove go1.16 target

commit 56652af
Author: Charlie Vieth [email protected]
Date: Sat Jan 29 02:14:16 2022 -0500

github: add workflows for Linux, macOS, and Windows

commit cecff90
Author: Charlie Vieth [email protected]
Date: Sat Jan 29 00:25:33 2022 -0500

add MIT LICENSE and reference Go's LICENSE

commit 5c62e67
Author: Charlie Vieth [email protected]
Date: Sat Jan 29 00:09:35 2022 -0500

darwin: use getdirentries64 for readDir

Use getdirentries64 for readDir since it reduces the number of syscalls.
Since getdirentries64 is deprecated and banned by the App Store the
'nogetdirentries' build tag can be used to omit its usage and linkage.

commit 5843c3c
Author: Charlie Vieth [email protected]
Date: Fri Jan 28 22:21:16 2022 -0500

convert Walk() to take a fs.WalkDirFunc

commit 576d1db
Author: Charlie Vieth [email protected]
Date: Thu Jan 27 19:55:40 2022 -0500

initial commit