Skip to content
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

feat: asm.js build #86

Merged
merged 5 commits into from Sep 19, 2021
Merged

feat: asm.js build #86

merged 5 commits into from Sep 19, 2021

Conversation

guybedford
Copy link
Owner

@guybedford guybedford commented Sep 18, 2021

This adds an asm.js build of es-module-lexer, built using Emscripten 1.40.1 that still supported asm.js builds.

This fixes the cold start problem we have with the JS build, while still fully supporting CSP.

The output size minified and brotli'd is 4.7KB, as opposed to 5.2KB for the JS and 4.5KB for the Wasm builds.

With optimizations turned up, performance is comparable to Wasm!

@GeoffreyBooth
Copy link

With optimizations turned up, performance is comparable to Wasm!

Do you have any numbers on this?

@guybedford
Copy link
Owner Author

The numbers are in the readme perf diff - https://github.com/guybedford/es-module-lexer#benchmarks.

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.

None yet

2 participants