Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Optimization: Avoid unecessary creations of guards array #60

Closed
wants to merge 0 commits into from

Conversation

niekschoemaker
Copy link

This avoids unecessary memory usage, minor optimization but could add up with many guards and hot paths.

@niekschoemaker
Copy link
Author

Added another commit related to linting issues a plugin noticed.

Using await on return values is unecessary as far as I know, unless it's in a try catch block it doesn't change the behavior whatso ever.
See: Difference between return await promise and return promise

And the forEach vs map is syntactically more correct, and performance is a bit better.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant