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

Remove quadratic behavior cloning rec groups #1952

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

alexcrichton
Copy link
Member

The call to clone_rec_group would create a new vector each time it was called of all clonable rec groups where if an empty rec group is cloned this creates quadratic behavior where each time a vector is created and one more item is appended.

The fix in this commit is to avoid creating a precise set of candidates to clone and just throwing out candidates that aren't applicable.

The call to `clone_rec_group` would create a new vector each time it
was called of all clonable rec groups where if an empty rec group is
cloned this creates quadratic behavior where each time a vector is
created and one more item is appended.

The fix in this commit is to avoid creating a precise set of candidates
to clone and just throwing out candidates that aren't applicable.
@fitzgen fitzgen added this pull request to the merge queue Dec 16, 2024
Merged via the queue into bytecodealliance:main with commit 4d785bb Dec 16, 2024
30 checks passed
@alexcrichton alexcrichton deleted the faster-clone-rec-group branch December 16, 2024 19:42
mjoerussell pushed a commit to manastech/wasm-tools that referenced this pull request Dec 17, 2024
The call to `clone_rec_group` would create a new vector each time it
was called of all clonable rec groups where if an empty rec group is
cloned this creates quadratic behavior where each time a vector is
created and one more item is appended.

The fix in this commit is to avoid creating a precise set of candidates
to clone and just throwing out candidates that aren't applicable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants