-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[JSC] Micro-optimize String equal operation with UChar / LChar #23804
[JSC] Micro-optimize String equal operation with UChar / LChar #23804
Conversation
EWS run on previous version of this PR (hash 388bff0) |
@@ -344,13 +344,36 @@ ALWAYS_INLINE bool equal(const LChar* a, const UChar* b, unsigned length) | |||
} | |||
return true; | |||
} | |||
// Otherwise, we just do a naive loop. | |||
#endif | |||
if (length >= 4) { |
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.
Since the cases < 8 don't use SIMD intrinsics, couldn't these also be enabled for x64 without further changes?
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.
The code is relying on that we have length >= 8
loop, which x64 does not have.
388bff0
to
1a508d6
Compare
EWS run on current version of this PR (hash 1a508d6) |
https://bugs.webkit.org/show_bug.cgi?id=268684 rdar://122224476 Reviewed by Ryosuke Niwa. This patch micro-optimizes String equal operation with different characters (UChar* and LChar*). ToT Patched todomvc-javascript-es5-json-parse 37.6466+-0.1862 ^ 37.1991+-0.1560 ^ definitely 1.0120x faster todomvc-javascript-es6-webpack-json-parse 58.9239+-0.3310 ^ 58.2251+-0.1931 ^ definitely 1.0120x faster * Source/WTF/wtf/text/StringCommon.h: Canonical link: https://commits.webkit.org/274064@main
1a508d6
to
bacdbda
Compare
Committed 274064@main (bacdbda): https://commits.webkit.org/274064@main Reviewed commits have been landed. Closing PR #23804 and removing active labels. |
bacdbda
1a508d6