Skip to content

Commit 33d4b2d

Browse files
committed
Update Dart flute WasmGC workload
This updates the Dart flute benchmark. Apart from using a newer Dart2Wasm compiler this brings two important changes: * The compiler & standard library will now use JavaScript strings as it's only string implementation. It takes advantage of `js-string` builtins if available. We anticipate all browsers adopting the `js-string` builtin proposal and optimize the builtin methods. NOTE: We currently don't *require* the `js-string` builtin to be available. We polyfill the imported methods and we import string constants from the mjs file. The main reason for this is that JavaScriptCore doesn't support `js-string` builtin yet (filed [0]). Once JSC supports the proposal we want to require it as it allows using the much more efficient string constant import mechanism (where string constants are utf8-encoded in the wasm module instead of importing from JS file) [0] https://bugs.webkit.org/show_bug.cgi?id=287402 (Before the compiler used 3 implementations: `{One,Two}ByteString` and `JSString` and copied the strings across the WasmGC<->JS boundary. But now that we get more performant JS strings we prefer using only JS strings due to avoiding the need to copy them across the boundary, working with JS RegExp, ...) * The flute benchmark is now compiled in `-O2` mode that ensures Dart soundness. It will perform runtime type checks as required by the Dart language as well as throw catchable exceptions on out-of-bounds accesses. (Before the benchmark was compiled in `-O4` mode which is unsound Dart, it didn't perform the type checks required by the Dart language specification and didn't perform index checks). We intend to switch Flutter web to also use `-O2` mode.
1 parent c4e2cf1 commit 33d4b2d

File tree

3 files changed

+2791
-125
lines changed

3 files changed

+2791
-125
lines changed

Dart/build.log

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Built on 2025-01-28 15:34:10+01:00
1+
Built on 2025-03-06 09:52:17+01:00
22
Cloning into 'wasm_gc_benchmarks'...
3-
cf32ca4 Recompile all benchmarks
3+
f80892d Update Dart SDK, switch wasm to -O2, recompile performance benchmarks
44
Copying files from wasm_gc_benchmarks/ into build/
55
Build success

0 commit comments

Comments
 (0)