Repository navigation
[WTF] Copy short 8-bit spans to 16-bit buffers without a loop - #80001
Merged
webkit-commit-queue merged 1 commit intoNov 25, 2026
Conversation
Collaborator
|
EWS run on current version of this PR (hash 0ba5b5e) Details |
sosukesuzuki
marked this pull request as ready for review
November 7, 2026 02:23
This was referenced Nov 12, 2026
Constellation
approved these changes
Nov 25, 2026
https://bugs.webkit.org/show_bug.cgi?id=330531 Reviewed by Yusuke Suzuki. When JSC resolves a 16-bit rope, it widens each 8-bit fiber with copyElements(uint16_t <- uint8_t). Previously, this function used a loop for every length. On ARM64, it copied one element at a time when the length was below 64. On x86_64, the compiler vectorized the loop into several stages, which is slow for a short fiber. This patch makes the function copy short spans without a loop. It covers the whole span with blocks anchored at both ends, each of which widens 4 or 8 elements with one load and one store. This is the widening counterpart of copySmallMemory. Spans longer than 32 elements still use the same loops. Tests: JSTests/microbenchmarks/rope-resolve-16bit-with-short-8bit-fibers.js Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp * JSTests/microbenchmarks/rope-resolve-16bit-with-short-8bit-fibers.js: Added. (build): (check): * Source/WTF/wtf/text/StringCommon.h: (WTF::widen4Elements): (WTF::widen8Elements): (WTF::copySmallMemoryWidening): (WTF::copyElements): * Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp: (TestWebKitAPI::TEST(WTF_StringCommon, CopyElements8To16)): Canonical link: https://commits.webkit.org/327768@main
webkit-commit-queue
force-pushed
the
eng/WTF-Copy-short-8-bit-spans-to-16-bit-buffers-without-a-loop
branch
from
November 25, 2026 15:23
0ba5b5e to
b5952ce
Compare
Collaborator
|
Committed 327768@main (b5952ce): https://commits.webkit.org/327768@main Reviewed commits have been landed. Closing PR #80001 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧪 webkitpy
b5952ce
0ba5b5e