-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-dart2wasmIssues for the dart2wasm compiler.Issues for the dart2wasm compiler.type-performanceIssue relates to performance or code sizeIssue relates to performance or code size
Description
Currently it seems that dart2wasm (a relatively simple compiler), uses 80% more memory than binaryen
When compiling flute specifically:
- dart2wasm uses 600 MB
- binaryen uses 330 MB
There's several reasons for this
- the AST is large
- the AST uses growable arrays instead of fixed-length arrays in nodes (in particular
FunctionNode,FunctionType,Arguments) - the AST seems to include the source code as bytes
- the dart2wasm code generator keeps the IL instruction objects around for all functions until the very end
We could consider investigating if there's some low hanging fruits.
ykmnkmi
Metadata
Metadata
Assignees
Labels
area-dart2wasmIssues for the dart2wasm compiler.Issues for the dart2wasm compiler.type-performanceIssue relates to performance or code sizeIssue relates to performance or code size