Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1803d6109d98baae1f4a4b9ad02b83546f25837e
https://github.com/WebKit/WebKit/commit/1803d6109d98baae1f4a4b9ad02b83546f25837e
Author: Sergey Rubanov <[email protected]>
Date: 2026-07-31 (Fri, 31 Jul 2026)
Changed paths:
A JSTests/microbenchmarks/wasm-table-create.js
A JSTests/wasm/stress/table-create-fill.js
M Source/JavaScriptCore/wasm/WasmTable.cpp
M Source/JavaScriptCore/wasm/WasmTable.h
M Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp
Log Message:
-----------
[JSC][Wasm] Speed up WebAssembly.Table construction
https://bugs.webkit.org/show_bug.cgi?id=288529
Reviewed by Yusuke Suzuki.
Table construction filled every live slot through JSWebAssemblyTable::set,
which did a full integrity audit and write barrier per index. For null fill
values the slots already start empty/null, so the loop was pure overhead.
For non-null fills (including the externref JS default of undefined), convert
to a single bulk fill with one audit and one write barrier.
On Release arm64, creating an 1e6-element externref table with a non-null
value drops from ~14ms to ~0.4ms; default/null creates are similarly faster.
* Source/JavaScriptCore/wasm/WasmTable.h:
* Source/JavaScriptCore/wasm/WasmTable.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp:
* JSTests/wasm/stress/table-create-fill.js: Added.
* JSTests/microbenchmarks/wasm-table-create.js: Added.
Canonical link: https://commits.webkit.org/318365@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications