-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOFS.ReadDir should check for fs.ReadDirFile #365
Labels
Comments
bep
added a commit
to bep/afero
that referenced
this issue
Jul 14, 2022
And implement `fs.ReadDirFile` for `BasePathFile`. There are other `File` implementations that could also benefit from the above, but this is a start. The primary motivation behind this is to allow `fs.WalkDir` use the native implementation whenever possible, as that new function was added in Go 1.16 with speed as its main selling point. This commit also adds a benchmark for `fs.WalkDir` that, when compared to the main branch: ```bash name old time/op new time/op delta WalkDir-10 369µs ± 1% 196µs ± 3% -46.89% (p=0.029 n=4+4) name old alloc/op new alloc/op delta WalkDir-10 85.3kB ± 0% 40.2kB ± 0% -52.87% (p=0.029 n=4+4) name old allocs/op new allocs/op delta WalkDir-10 826 ± 0% 584 ± 0% -29.30% (p=0.029 n=4+4) ``` Fixes spf13#365
bep
added a commit
to bep/afero
that referenced
this issue
Jul 14, 2022
And implement `fs.ReadDirFile` for `BasePathFile`. There are other `File` implementations that could also benefit from the above, but this is a start. The primary motivation behind this is to allow `fs.WalkDir` use the native implementation whenever possible, as that new function was added in Go 1.16 with speed as its main selling point. This commit also adds a benchmark for `fs.WalkDir` that, when compared to the main branch: ```bash name old time/op new time/op delta WalkDir-10 369µs ± 1% 196µs ± 3% -46.89% (p=0.029 n=4+4) name old alloc/op new alloc/op delta WalkDir-10 85.3kB ± 0% 40.2kB ± 0% -52.87% (p=0.029 n=4+4) name old allocs/op new allocs/op delta WalkDir-10 826 ± 0% 584 ± 0% -29.30% (p=0.029 n=4+4) ``` Fixes spf13#365
bep
added a commit
to bep/afero
that referenced
this issue
Jul 14, 2022
And implement `fs.ReadDirFile` for `BasePathFile`. There are other `File` implementations that could also benefit from the above, but this is a start. The primary motivation behind this is to allow `fs.WalkDir` use the native implementation whenever possible, as that new function was added in Go 1.16 with speed as its main selling point. This commit also adds a benchmark for `fs.WalkDir` that, when compared to the main branch: ```bash name old time/op new time/op delta WalkDir-10 369µs ± 1% 196µs ± 3% -46.89% (p=0.029 n=4+4) name old alloc/op new alloc/op delta WalkDir-10 85.3kB ± 0% 40.2kB ± 0% -52.87% (p=0.029 n=4+4) name old allocs/op new allocs/op delta WalkDir-10 826 ± 0% 584 ± 0% -29.30% (p=0.029 n=4+4) ``` Fixes spf13#365
bep
added a commit
to bep/afero
that referenced
this issue
Jul 14, 2022
And implement `fs.ReadDirFile` for `BasePathFile`. There are other `File` implementations that could also benefit from the above, but this is a start. The primary motivation behind this is to allow `fs.WalkDir` use the native implementation whenever possible, as that new function was added in Go 1.16 with speed as its main selling point. This commit also adds a benchmark for `fs.WalkDir` that, when compared to the main branch: ```bash name old time/op new time/op delta WalkDir-10 369µs ± 1% 196µs ± 3% -46.89% (p=0.029 n=4+4) name old alloc/op new alloc/op delta WalkDir-10 85.3kB ± 0% 40.2kB ± 0% -52.87% (p=0.029 n=4+4) name old allocs/op new allocs/op delta WalkDir-10 826 ± 0% 584 ± 0% -29.30% (p=0.029 n=4+4) ``` Fixes spf13#365
bep
added a commit
that referenced
this issue
Jul 14, 2022
And implement `fs.ReadDirFile` for `BasePathFile`. There are other `File` implementations that could also benefit from the above, but this is a start. The primary motivation behind this is to allow `fs.WalkDir` use the native implementation whenever possible, as that new function was added in Go 1.16 with speed as its main selling point. This commit also adds a benchmark for `fs.WalkDir` that, when compared to the main branch: ```bash name old time/op new time/op delta WalkDir-10 369µs ± 1% 196µs ± 3% -46.89% (p=0.029 n=4+4) name old alloc/op new alloc/op delta WalkDir-10 85.3kB ± 0% 40.2kB ± 0% -52.87% (p=0.029 n=4+4) name old allocs/op new allocs/op delta WalkDir-10 826 ± 0% 584 ± 0% -29.30% (p=0.029 n=4+4) ``` Fixes #365
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: