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

src: prefer 3-argument Array::New() #15

Merged
merged 1 commit into from
Feb 16, 2020
Merged

Conversation

sthagen
Copy link
Owner

@sthagen sthagen commented Feb 16, 2020

This is nicer, because:

  1. It reduces overall code size,
  2. It’s faster, because Object::Set() calls are relatively slow, and
  3. It helps avoid invalid .Check()/.FromJust() calls.

PR-URL: nodejs#31775
Reviewed-By: James M Snell jasnell@gmail.com
Reviewed-By: Ben Noordhuis info@bnoordhuis.nl
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: David Carlier devnexen@gmail.com

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

This is nicer, because:

1. It reduces overall code size,
2. It’s faster, because `Object::Set()` calls are relatively slow, and
3. It helps avoid invalid `.Check()`/`.FromJust()` calls.

PR-URL: #31775
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@sthagen sthagen merged commit 125aca4 into sthagen:master Feb 16, 2020
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.

2 participants