Skip to content
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

du: our implementation is slower than GNU's #6845

Open
sylvestre opened this issue Nov 5, 2024 · 3 comments
Open

du: our implementation is slower than GNU's #6845

sylvestre opened this issue Nov 5, 2024 · 3 comments

Comments

@sylvestre
Copy link
Contributor

On firefox source code (lot of files and directories):

# with 0.0.17:

$ hyperfine "/usr/bin/du " "/usr/lib/cargo/bin/coreutils/du" 
Benchmark 1: /usr/bin/du
  Time (mean ± σ):      3.804 s ±  0.051 s    [User: 1.174 s, System: 2.606 s]
  Range (min … max):    3.722 s …  3.884 s    10 runs

Benchmark 2: /usr/lib/cargo/bin/coreutils/du
  Time (mean ± σ):      4.822 s ±  0.056 s    [User: 1.608 s, System: 3.190 s]
  Range (min … max):    4.754 s …  4.921 s    10 runs

Summary
  '/usr/bin/du ' ran
    1.27 ± 0.02 times faster than '/usr/lib/cargo/bin/coreutils/du '

seems that we regressed:

# with 0.0.26:

hyperfine "/usr/bin/du " "/usr/lib/cargo/bin/coreutils/du "
Benchmark 1: /usr/bin/du
  Time (mean ± σ):      3.980 s ±  0.075 s    [User: 1.181 s, System: 2.772 s]
  Range (min … max):    3.887 s …  4.087 s    10 runs

Benchmark 2: /usr/lib/cargo/bin/coreutils/du
  Time (mean ± σ):      6.947 s ±  0.096 s    [User: 2.533 s, System: 5.479 s]
  Range (min … max):    6.800 s …  7.104 s    10 runs

Summary
  '/usr/bin/du ' ran
    1.75 ± 0.04 times faster than '/usr/lib/cargo/bin/coreutils/du '
@sylvestre
Copy link
Contributor Author

@jesseschalken has been working on it

#6839
#6840
#6841

@sylvestre
Copy link
Contributor Author

With the three PR, we are almost the same level:

$ hyperfine "/usr/bin/du" "/home/sylvestre/dev/debian/coreutils/target/release/coreutils du"
Benchmark 1: /usr/bin/du
  Time (mean ± σ):      4.108 s ±  0.113 s    [User: 1.237 s, System: 2.843 s]
  Range (min … max):    3.885 s …  4.312 s    10 runs

Benchmark 2: /home/sylvestre/dev/debian/coreutils/target/release/coreutils du
  Time (mean ± σ):      4.256 s ±  0.073 s    [User: 1.954 s, System: 3.315 s]
  Range (min … max):    4.100 s …  4.333 s    10 runs

Summary
  '/usr/bin/du' ran
    1.04 ± 0.03 times faster than '/home/sylvestre/dev/debian/coreutils/target/release/coreutils du'

@sylvestre
Copy link
Contributor Author

a profile with the 3 PR https://share.firefox.dev/4fdZpVX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant