Conversation
…an blocks to see if they have breaks to them
|
When do you want to load but don't care about validation? |
| BreakTarget(Name name, int arity) : name(name), arity(arity) {} | ||
| }; | ||
| std::vector<BreakTarget> breakStack; | ||
| std::unordered_set<Name> seenBreaks; |
There was a problem hiding this comment.
How about calling this breakTargets instead, since it's not a set of the break instructions, but rather their targets?
There was a problem hiding this comment.
Hmm, maybe, but we have a struct called BreakTarget so that might be confusing. It contains a name and and arity. So maybe breakTargetNames?
|
Well, maybe if someone is sure it's valid binary that was emitted as part of a build system, maybe they would want to disable validation. Or maybe we should optimize validation speed ;) It's not even parallelized currently. |
|
Parallelizing validation is probably worth it too since it's noticeable time in compilation, not just when reading (we validate at the end by default, currently). I'll look into it. |
Use a set of the breaks we've seen, don't rescan blocks to see if they have breaks to them.
This makes wasm loading 25% faster, ignoring validation.
Side note: Validation is by far most of the time spent when loading wasm. Perhaps we should have a
--no-validationoption?