Skip to content

Prepare for Binaryen compiled to Wasm #1029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 31, 2019
Merged

Prepare for Binaryen compiled to Wasm #1029

merged 5 commits into from
Dec 31, 2019

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Dec 28, 2019

This PR naively instructs asc to use the Wasm variant of Binaryen, resulting in the parallel tests completing in 14s compared to 19s on my machine.

This has major problems still, though, since one can't just require("assemblyscript") before Binaryen has been loaded and is ready due to all the Binaryen ops becoming aliased to enums in src/module.ts, which runs immediately. I guess the API has to be reworked to account for this properly.

@MaxGraey
Copy link
Member

MaxGraey commented Dec 28, 2019

On typedarray test optimization example.
Before (binaryen js): 6133 ms
https://github.com/AssemblyScript/assemblyscript/runs/365727582#step:6:4706

Current (binaryen wasm): 3957 ms
https://github.com/AssemblyScript/assemblyscript/runs/365967564#step:6:4706

@dcodeIO dcodeIO changed the title Use Binaryen compiled to Wasm Prepare for Binaryen compiled to Wasm Dec 31, 2019
@dcodeIO
Copy link
Member Author

dcodeIO commented Dec 31, 2019

This keeps using the JS variant (for now) so existing transforms that require("binaryen") do not conflict with the version of Binaryen used by the compiler, yet keeps the preparation work around so we can make the switch eventually.

@dcodeIO dcodeIO merged commit 4611609 into master Dec 31, 2019
@dcodeIO dcodeIO deleted the update-binaryen-wasm branch January 1, 2020 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants