-
Notifications
You must be signed in to change notification settings - Fork 627
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix quadratic runtime for duplicate export name detection
Previously, the loader would check the name of a new export against all existing exports, leading to a quadratic running time. This change makes the loader parse the entire export section. The exports are then sorted by name, then adjacent exports are checked for uniqueness. As a side effect, the exports will appear in the parsed module in alphabetical order, not load order. This could be useful for improving the performance of the various wasm_runtime_lookup functions (binary instead of linear search).
- Loading branch information
Showing
1 changed file
with
44 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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