You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my laptop, I get the following results when running benchmarks for non-seekable files...
hyperfine "cat shakespeare.txt | head -n -100000" "cat shakespeare.txt | ./target/release/head -n -100000"
Summary
cat shakespeare.txt | head -n -100000 ran
16.03 ± 1.60 times faster than cat shakespeare.txt | ./target/release/head -n -100000
hyperfine "cat shakespeare.txt | head -c -100000" "cat shakespeare.txt | ./target/release/head -c -100000"
Summary
cat shakespeare.txt | head -c -100000 ran
18.56 ± 1.61 times faster than cat shakespeare.txt | ./target/release/head -c -100000
So the current Rust implementation is a lot slower than GNU for non-seekable files.
I have some changes drafted to resolve this and they seem to be work well. I need to tidy up the code and then I'll post with updated benchmarking results.
The text was updated successfully, but these errors were encountered:
karlmcdowall
changed the title
Head performance is pretty bad for non-seekable files
head: performance is pretty bad for non-seekable files
Mar 1, 2025
On my laptop, I get the following results when running benchmarks for non-seekable files...
So the current Rust implementation is a lot slower than GNU for non-seekable files.
I have some changes drafted to resolve this and they seem to be work well. I need to tidy up the code and then I'll post with updated benchmarking results.
The text was updated successfully, but these errors were encountered: