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

Create closure of object/array literal #45

Open
2 tasks
ackava opened this issue Apr 24, 2022 · 0 comments
Open
2 tasks

Create closure of object/array literal #45

ackava opened this issue Apr 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@ackava
Copy link
Contributor

ackava commented Apr 24, 2022

Constructing object/array literals eat up significant time, to improve speed, we can lift such literals out side of function, thus by creating a closure, will remove need of initialization. And instances will be kept alive as long as the function capturing them is alive.

  • The literal should not be returned
  • It should not be modified in the scope of the function
@ackava ackava added the enhancement New feature or request label Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant