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

Incorrect result for fastfetch #729

Closed
FelixFourcolor opened this issue Mar 10, 2024 · 2 comments
Closed

Incorrect result for fastfetch #729

FelixFourcolor opened this issue Mar 10, 2024 · 2 comments

Comments

@FelixFourcolor
Copy link

Typical run time of fastfetch on my system:

$ time fastfetch >/dev/null
________________________________________________________
Executed in   33.64 millis    fish           external
   usr time   13.04 millis    0.00 micros   13.04 millis
   sys time   12.51 millis  622.00 micros   11.88 millis

Hyperfine's report:

$ hyperfine "fastfetch >/dev/null"

Benchmark 1: fastfetch >/dev/null
  Time (mean ± σ):      18.1 ms ±   3.2 ms    [User: 9.0 ms, System: 10.2 ms]
  Range (min … max):     7.2 ms …  31.3 ms    83 runs

Warning: The first benchmarking run for this command was significantly slower than the rest (31.3 ms). This could be caused by (filesystem) caches that were not filled until after the first run. You should consider using the '--warmup' option to fill those caches before the actual benchmark. Alternatively, use the '--prepare' option to clear the caches before each timing run.

Only the first run accurately represents fastfetch's typical run time, subsequent runs are much faster. Running hyperfine with --warmup like the warning suggests does not change the result.

(Arch linux, hyperfine 1.18.0, fastfetch 2.8.8, both installed from arch official repo.)

@sharkdp
Copy link
Owner

sharkdp commented Mar 10, 2024

This seems completely normal. The first run is slow, while subsequent runs are faster. Presumably due to disk caches. Try running time fastfetch in fast succession and you should see similar results.

And please read this section: https://github.com/sharkdp/hyperfine?tab=readme-ov-file#warmup-runs-and-preparation-commands which explains how to do warm-cache and/or cold-cache benchmarks.

@FelixFourcolor
Copy link
Author

Try running time fastfetch in fast succession and you should see similar results.

You're right. My bad, I should've tried that before opening an issue.

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

No branches or pull requests

2 participants