Add size-optimized WASM build using -Oz flag#52
Merged
Conversation
- Created build_wasm_optimized.py that builds with -Oz optimization - Achieves 35% size reduction: 229KB → 148KB - Note: -O3 actually increases size (to 248KB) due to aggressive inlining - Verified optimized build passes all functional tests - Updated README.md and notes.md with optimization findings
Owner
Author
|
I prompted:
|
simonw
added a commit
to simonw/tools
that referenced
this pull request
Dec 24, 2025
* Add optimized MicroQuickJS WASM and version selector - Add mquickjs_optimized.js and mquickjs_optimized.wasm (148 KB vs 223 KB) - Add WASM version selector dropdown defaulting to optimized build - Version persists via URL parameter (?wasm=original for non-optimized) - Both versions tested with playwright-python and work correctly * Add playwright test script for microquickjs.html Tests both optimized and original WASM versions with 6 test cases covering basic operations, functions, JSON, arrays, and strings. Refs: simonw/research#52 --------- Co-authored-by: Claude <noreply@anthropic.com>
ashkulz
reviewed
Dec 24, 2025
|
|
||
| ### WASM Size Optimization | ||
|
|
||
| **Date**: 2024-12-24 |
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.
Tip from azakai on Hacker News: https://news.ycombinator.com/context?id=46370980