Skip to content

chore: manual inline formatting #7689

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

Merged
merged 1 commit into from
Apr 10, 2025
Merged

chore: manual inline formatting #7689

merged 1 commit into from
Apr 10, 2025

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented Apr 8, 2025

Minor manual cleanup - inlined many format args. This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs. Note that &foo in a format! parameter results in a 6% extra performance cost, and does not get inlined by the compiler (yet).

Copy link

github-actions bot commented Apr 8, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

@cakebaker
Copy link
Contributor

Please take a look at src/uu/id/src/id.rs - there might be a bug there (tagged with BUG comment) line 588

That's a bug, good catch!

nyurik added a commit to nyurik/coreutils that referenced this pull request Apr 8, 2025
Spotted while doing format arg inlining, and confirmed in uutils#7689 (comment)
@nyurik nyurik force-pushed the inline2 branch 2 times, most recently from 371dde8 to 17c0275 Compare April 8, 2025 16:27
@nyurik nyurik changed the title chore: manual inline formatting, bug? chore: manual inline formatting Apr 8, 2025
@nyurik
Copy link
Contributor Author

nyurik commented Apr 8, 2025

@cakebaker thx for confirming, I moved a fix for that into #7696

Copy link

github-actions bot commented Apr 8, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)

Minor manual cleanup - inlined many format args.  This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs.  Note that `&foo` in a `format!` parameter results in a 6% extra performance cost, and does not get inlined by the compiler (yet).
@nyurik
Copy link
Contributor Author

nyurik commented Apr 9, 2025

rebased

Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit eca400f into uutils:main Apr 10, 2025
69 checks passed
@nyurik nyurik deleted the inline2 branch April 10, 2025 11:54
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

Successfully merging this pull request may close these issues.

3 participants