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

For the OpMap VM instruction, since numElements is known just use the capacity hint. #347

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

deckarep
Copy link
Contributor

@deckarep deckarep commented Sep 5, 2021

This optimization perhaps is premature but I think it's a small easy win to just allocate the map precisely with the target number of elements since they are known from the bytecode operand.

… capacity hint.

This optimization perhaps is premature but I think it's a small easy win to just allocate the map precisely with the target number of elements.
@geseq
Copy link
Collaborator

geseq commented Sep 5, 2021

It’s unlikely to make any real difference irl as it’d presume defining a large map which in most cases would make the code unwieldy. But at the same time doesn’t hurt either

@geseq geseq merged commit d9b300c into d5:master Sep 21, 2021
@deckarep deckarep deleted the patch-1 branch September 19, 2023 17:56
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.

None yet

2 participants