ls: allocate less strings when formatting item names and hyperlinks#10669
ls: allocate less strings when formatting item names and hyperlinks#10669Nekrolm wants to merge 1 commit intouutils:mainfrom
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.
please add comments explaining why you are doing this :)
There was a problem hiding this comment.
comments are already there for this trait -- updated it
4e2410b to
6243fdd
Compare
|
GNU testsuite comparison: |
|
please run rustfmt |
6243fdd to
2935836
Compare
|
GNU testsuite comparison: |
Was looking into #10662
While most time spent in getdents & lstat syscalls, allocations are still taking around 3-5% of the time