Repository navigation
uucore: detect ASIMD on big-endian aarch64 too - #15556
ChihweiLHBird wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Merging this PR will degrade performance by 4.85%1 warning, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
3361758 to
d3f72ae
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
I'd suggest exposing |
d3f72ae to
b5d6705
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
We have the following condition: if simd_allowed {
bytecount::num_chars(&buf[..n])
} else {
bytecount::naive_num_chars(&buf[..n])
};However, Given this, I think commit |
But the original commit would make |
|
Right, we would see something like: $ wc --debug
debug: using hardware support (features: ASIMD)The issue is that whether |
|
@xtqqczze Yes, exactly. The bigger issue is that these debug messages originated in GNU. So do we want to mock GNU's behavior on the same hardware (the current way) or to reflect the real instructions set usage of uutils? |
|
And also, for this PR, with these context, should we proceed with |
|
Fuzzing failures tracked by #15567. |
The ASIMD check no longer depends on byte order. wc keeps the little-endian condition next to its bytecount use, because bytecount compiles its NEON path only on little-endian targets. Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
b5d6705 to
7d24e94
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
The current wc design is really non-ideal, since we miss out on the bytecount::integer_simd implementation and fallback to a naive implementation when ASIMD is not available, but this seems fine for now.
Fundamentally the use of the bytecount crate is not really compatible with the debug: using hardware support feature as the crate decides which hardware features to use.
detect_asimdonly ran on little-endian aarch64. Rust's feature detection does not depend on byte order, so uucore now reports ASIMD on both.wc is the only user of the flag, and its count path comes from bytecount, which compiles its NEON path only on little-endian targets. So wc keeps the little-endian condition, now next to that use, with a comment that says why. wc behaves the same as before on every target, so there is no new test. Related: #14821.