forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ext/node): use array instead of Vec to avoid wrong capacity all…
…ocation (denoland#25183) This commit gets deno_node's customizer to use fixed-length array instead of `Vec` to avoid wrong capacity allocation. In the previous code we reserve a capacity of 14 for `external_references`. However, after pushing all the necessary `ExternalReference`s, it ends up with a length of 21, not 14. This means another allocation happens even though we reserve some space. To make sure that there will no longer be extra allocation, it should be a good idea to use fixed-length array here.
- Loading branch information
1 parent
2ab4afc
commit b0ea6e0
Showing
1 changed file
with
110 additions
and
109 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