Repository navigation
Conversation
…3.beta
Until now, Dart-flute-todomvc-wasm and Dart-flute-complex-wasm copied
prebuilt binaries from mkustermann/wasm_gc_benchmarks, compiled with Dart
3.10.0-37.0.dev. build.sh now downloads Dart SDK 3.14.0-315.3.beta and
compiles lib/complex.dart and lib/todomvc.dart directly from upstream
dart-lang/flute (712764b), using the same compiler flags as
wasm_gc_benchmarks/compile.sh (`dart compile wasm -Ddart.vm.product=true
-O2 --no-strip-wasm`).
Building directly from dart-lang/flute cuts mkustermann/wasm_gc_benchmarks
out of the dependency chain (benchmark.js already vendors the shell
event-loop runner) and picks up b84119f ("dart.library.js_util ->
dart.library.js_interop for web detection", dart-lang/sdk#61550). Dart
3.14 removed dart:js_util on dart2wasm, so the older flute commit pinned
by wasm_gc_benchmarks (d5adc4d) evaluated `bool.fromEnvironment(
'dart.library.js_util')` to false, silently flipping `kIsWeb` from true to
false across ~40 framework checks and retaining `!kIsWeb` code. The other
7 commits between d5adc4d and 712764b are GitHub Actions workflow bumps.
We use the Dart 3.14 beta SDK rather than 3.13.7 stable because dart2wasm
3.14 emits standard Wasm exception handling (try_table / throw_ref)
unconditionally instead of legacy try / catch instructions
(dart-lang/sdk#54394; 3.13.7 has no flag for try_table). Once Dart 3.14
stable ships, build.sh can switch DART_CHANNEL back to stable.
The generated .mjs loader requires JS String Builtins
(`builtins: ['js-string'], importedStringConstants: ''`, without the old
JS fallback: Chrome 130, Firefox 134, Safari 26.2) and imports
WebAssembly.JSTag (Chrome 115, Firefox 129, Safari 18.4).
Sizes, old -> new (code section in parentheses):
flute.complex 1,361,004 -> 1,361,608 bytes (656,910 -> 640,126)
flute.todomvc 1,671,597 -> 1,693,638 bytes (795,168 -> 787,224)
Score change, d8 (15.9.60) / jsc (325217) / SpiderMonkey (160.0b3) (each
test alone in a fresh shell, 6 interleaved rounds):
Dart-flute-todomvc-wasm +4.2% / +3.7% / -1.0%
Dart-flute-complex-wasm +6.1% / +7.7% / +5.2%
Part of WebKit#277.
✅ Deploy Preview for webkit-jetstream-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Part of #277. cc @mkustermann
Build
Dart-flute-todomvc-wasmandDart-flute-complex-wasmfrom source with Dart SDK3.14.0-315.3.beta(dart compile wasm -Ddart.vm.product=true -O2 --no-strip-wasm), replacing the prebuilt Dart3.10.0-37.0.devbinaries frommkustermann/wasm_gc_benchmarks.Tracking
dart-lang/flutedirectly (712764b):build.shcompileslib/{complex,todomvc}.dartstraight fromdart-lang/flute, cuttingmkustermann/wasm_gc_benchmarksout of the dependency chain (benchmark.jsalready vendors the shell task-queue runner).flutefromd5adc4dto712764bpicks upb84119f(dart.library.js_util -> dart.library.js_interop, dart-lang/sdk#61550); Dart 3.14 removeddart:js_utilondart2wasm, which otherwise flippedkIsWebtofalseand retained ~200 KB of!kIsWebcode.Toolchain and binaries:
3.14.0-315.3.betaemits standard Wasmexnref(try_table/throw_ref, 0 legacytry/catchinstructions) via dart-lang/sdk#54394, whereas 3.13.7 only emits legacytry/catch.WebAssembly.JSTag(Chrome 115, Firefox 129, Safari 18.4).--no-strip-wasmnamesection (complex: 1.36 MB,todomvc: 1.69 MB); bothCodesections shrink slightly.Scores (Linux x64 workstation with
jsvushells, each test alone in a fresh shell, 6 interleaved rounds; change of the mean score, bold = statistically significant at 95% confidence; @kmiller68 may want to check on macOS / arm64):d8(15.9.60)jsc(325217)Dart-flute-todomvc-wasmDart-flute-complex-wasmFirst and Average subscores
d8First / AveragejscFirst / AverageDart-flute-todomvc-wasmDart-flute-complex-wasmTODO: switch
DART_CHANNELinbuild.shfrombetatostable(3.14.0) once Dart 3.14 stable ships.