Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

perf: use optional chaining #850

Merged
merged 1 commit into from
Jan 5, 2025
Merged

perf: use optional chaining #850

merged 1 commit into from
Jan 5, 2025

Conversation

Fdawgs
Copy link
Member

@Fdawgs Fdawgs commented Jan 5, 2025

Teeny tiny bit faster for a single hop: https://github.com/RafaelGSS/nodejs-bench-operations/blob/main/RESULTS-v22.md#optional-chain--vs--operator

Also allows some ternary operators to be changed to or operators.

Checklist

@Fdawgs Fdawgs merged commit 79384b1 into master Jan 5, 2025
13 checks passed
@Fdawgs Fdawgs deleted the perf/chain branch January 5, 2025 19:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant