-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fold: read input in chunks #10396
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
base: main
Are you sure you want to change the base?
fold: read input in chunks #10396
Conversation
This allows processing input that does not contain newlines.
|
GNU testsuite comparison: |
CodSpeed Performance ReportMerging this PR will degrade performance by 5.28%Comparing Summary
Performance Changes
Footnotes
|
src/uu/fold/src/fold.rs
Outdated
| }; | ||
|
|
||
| match std::str::from_utf8(&buffer) { | ||
| Ok(s) => process_utf8_line(s, &mut ctx)?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theres a bug here where non-utf8 characters at the end of a chunk can be split in two so a single multi byte character will be split into multiple characters.
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
This allows processing input that does not contain newlines. Adresses #10227