WebAssembly / WebAssembly/binaryen
Stop building with assertions enabled by default?
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
Early in Binaryen's history we wanted assertions in all builds in order to catch bugs. It was useful for a while but maybe today it is excessive. Profiling a 200MB wasm file now, I see just isDebugEnabled takes 2.64% of the time. While we could optimize that perhaps, there is surely lots of other overhead from assertions.
Having assertions in our main builds does mean user bug reports are potentially more helpful, but I can't remember them actually helping much? So I'm leaning towards setting BYN_ENABLE_ASSERTIONS to false by default.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the BYN_ENABLE_ASSERTIONS setting and the isDebugEnabled path mentioned in the report. Compare the current default with assertions disabled using a representative WebAssembly input, then weigh the performance impact against the value of assertions in user bug reports. Done means the default-setting decision is resolved and its consequences are validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- build-system, compilers, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100