-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ls: allocate less strings when formatting item names and hyperlinks #10669
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?
Conversation
|
could you please share the hyperfine benchmark results ? (without the patch, with and with gnu) |
I don't expect much from these changes. But maybe optimising calls to getdents (tweak the buffer size?) is a more promising way. |
|
getdents buffer is not a case, actually: gnu version just makes 60% less calls for fstat (newfstatat) fstatat calls -- around 10% on the flamegraph I posted above |
| } | ||
| } | ||
|
|
||
| impl ExtendPad for String { |
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.
please add comments explaining why you are doing this :)
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.
comments are already there for this trait -- updated it
4e2410b to
6243fdd
Compare
|
GNU testsuite comparison: |
|
please run rustfmt |
6243fdd to
2935836
Compare
Was looking into #10662
While most time spent in getdents & lstat syscalls, allocations are still taking around 3-5% of the time