mirror of https://github.com/sharkdp/fd.git
Update benchmark results
This commit is contained in:
parent
ec1f23cf34
commit
1430c1d7bf
24
README.md
24
README.md
|
@ -35,24 +35,18 @@ complete (and more colorful) variants, see
|
||||||
[here](https://github.com/trapd00r/LS_COLORS).
|
[here](https://github.com/trapd00r/LS_COLORS).
|
||||||
|
|
||||||
## Benchmark
|
## Benchmark
|
||||||
A search in my home folder with ~80.000 subdirectories
|
A search in my home folder with ~150.000 subdirectories and ~1M files. The given options for
|
||||||
and ~350.000 files. The `--hidden` for `fd` is needed
|
`fd` are needed for a fair comparison (otherwise `fd` is even faster by a factor of 4 because it
|
||||||
for a fair comparison, as *find* does this by default:
|
does not have to search hidden and ignored paths):
|
||||||
``` bash
|
``` bash
|
||||||
> time fd --hidden '\.jpg$' > /dev/null
|
> time fd --hidden --no-ignore --full-path '.*[0-9]\.jpg$' > /dev/null
|
||||||
0,39s user 0,40s system 99% cpu 0,790 total
|
1,03s user 0,92s system 99% cpu 1,961 total
|
||||||
|
|
||||||
> time find -iname '*.jpg' > /dev/null
|
> time find -iregex '.*[0-9]\.jpg$' > /dev/null
|
||||||
0,36s user 0,42s system 98% cpu 0,789 total
|
3,98s user 0,84s system 99% cpu 4,832 total
|
||||||
```
|
|
||||||
Both tools found the exact same 5504 files and have
|
|
||||||
a comparable performance (averaged over multiple runs),
|
|
||||||
even though *fd* performs a regex search.
|
|
||||||
If we do the same for *find*, it is significantly slower:
|
|
||||||
``` bash
|
|
||||||
> time find -iregex '.*\.jpg$' > /dev/null
|
|
||||||
1,29s user 0,41s system 99% cpu 1,705 total
|
|
||||||
```
|
```
|
||||||
|
Both tools found the exact same 14030 files and the results are comparable when averaged over
|
||||||
|
multiple runs.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
With [cargo](https://github.com/rust-lang/cargo), you can clone, build and install *fd* with a single command:
|
With [cargo](https://github.com/rust-lang/cargo), you can clone, build and install *fd* with a single command:
|
||||||
|
|
Loading…
Reference in New Issue