Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c809392be2a358e2e1532a77029013dfe21ec907
https://github.com/WebKit/WebKit/commit/c809392be2a358e2e1532a77029013dfe21ec907
Author: Sosuke Suzuki <[email protected]>
Date: 2026-06-21 (Sun, 21 Jun 2026)
Changed paths:
A JSTests/microbenchmarks/wasm-into-char-code-array-8bit-short.js
A JSTests/microbenchmarks/wasm-into-char-code-array-8bit.js
M Source/JavaScriptCore/wasm/js/WebAssemblyBuiltin.cpp
Log Message:
-----------
[Wasm] `intoCharCodeArray` copies 8-bit strings one character at a time
https://bugs.webkit.org/show_bug.cgi?id=316494
Reviewed by Yusuke Suzuki.
The 8-bit path of the wasm:js-string intoCharCodeArray builtin widens
Latin-1 characters to UTF-16 one character at a time through
String::operator[], which performs an is8Bit() branch per character and
cannot be vectorized. Replace it with JSString::view() and
StringView::getCharacters(), which
performs SIMD widening via
StringImpl::copyCharacters(); on ARM64 it widens 64 characters per
iteration with NEON vmovl.
wasm-into-char-code-array-8bit-short 34.6306+-1.3987 ^ 28.1730+-2.0097
^ definitely 1.2292x faster
wasm-into-char-code-array-8bit 70.4834+-8.7056 ^ 6.4666+-0.1494
^ definitely 10.8996x faster
Tests: JSTests/microbenchmarks/wasm-into-char-code-array-8bit-short.js
JSTests/microbenchmarks/wasm-into-char-code-array-8bit.js
* JSTests/microbenchmarks/wasm-into-char-code-array-8bit-short.js: Added.
* JSTests/microbenchmarks/wasm-into-char-code-array-8bit.js: Added.
* Source/JavaScriptCore/wasm/js/WebAssemblyBuiltin.cpp:
(JSC::DEFINE_BUILTIN_IMPLEMENTATION_I32):
Canonical link:
https://flagged.apple.com:443/proxy?t2=Dq2w9l2VQ4&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE1NTY1QG1haW4=&emid=01be0225-a15c-4372-a8df-b6b02639b629&c=11
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications