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

Investigate using indexmap instead of BTreeMap and Vec where now the .iter().position(...) is used for linear lookup #4

Open
mtolmacs opened this issue Apr 19, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mtolmacs
Copy link
Owner

Background

The indexmap crate is already used by the dependencies of this lib (wasmparser -> object) and would offer a better lookup speed while sparing the extra sorting on the data set, which can offer some speedup in sourcemap generation.

Success

No loss of performance. The usage of indexmap is more idiomatic in this setting, which is a win in itself.

@mtolmacs mtolmacs added enhancement New feature or request good first issue Good for newcomers labels Apr 19, 2023
@mtolmacs mtolmacs changed the title Investigate using indexmap instead of BTreeMap and Vec lookup Investigate using indexmap instead of BTreeMap and Vec where now the .iter().position(...) is used for linear lookup Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant