FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

module: refactor to avoid unsafe array iteration by aduh95 · Pull Request #36680 · nodejs/node · GitHub

/ node Public

module: refactor to avoid unsafe array iteration - #36680

Merged
aduh95 merged 1 commit into
nodejs:masterfrom
aduh95:module-array-iteration
Jan 6, 2021
Merged

module: refactor to avoid unsafe array iteration#36680
aduh95 merged 1 commit into
nodejs:masterfrom
aduh95:module-array-iteration

Conversation

aduh95 commented Dec 29, 2020

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Dec 29, 2020
PoojaDurgad added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 31, 2020
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 31, 2020

Copy link
Copy Markdown
Contributor

aduh95 commented Jan 2, 2021

Copy link
Copy Markdown
Contributor Author

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/851/ (queued, will 404 until it starts)

Trott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM if benchmarks are OK

aduh95 commented Jan 2, 2021

Copy link
Copy Markdown
Contributor Author

Benchmark didn't show any significant perf improvement or regression:

                                                                                   confidence improvement accuracy (*)    (**)   (***)
 module/module-loader.js cache='false' n=1000 files=500 dir='abs' name='/'                 **     -4.18 %       ±2.74%  ±3.65%  ±4.74%
 module/module-loader.js cache='true' n=1 files=500 dir='abs' name='/'                     **      6.20 %       ±4.37%  ±5.88%  ±7.79%
Details
                                                                                   confidence improvement accuracy (*)    (**)   (***)
 module/module-loader-circular.js n=10000                                                         -1.26 %       ±3.27%  ±4.35%  ±5.67%
 module/module-loader-deep.js cache='false' files=1000 ext=''                                      1.15 %       ±3.53%  ±4.70%  ±6.11%
 module/module-loader-deep.js cache='false' files=1000 ext='.js'                                  -0.30 %       ±3.82%  ±5.08%  ±6.61%
 module/module-loader-deep.js cache='true' files=1000 ext=''                                      -4.85 %       ±5.63%  ±7.54%  ±9.92%
 module/module-loader-deep.js cache='true' files=1000 ext='.js'                                   -1.06 %      ±10.95% ±14.57% ±18.98%
 module/module-loader.js cache='false' n=1000 files=500 dir='abs' name='/'                 **     -4.18 %       ±2.74%  ±3.65%  ±4.74%
 module/module-loader.js cache='false' n=1000 files=500 dir='abs' name=''                          0.70 %       ±3.48%  ±4.63%  ±6.03%
 module/module-loader.js cache='false' n=1000 files=500 dir='abs' name='/index.js'                 3.03 %       ±5.00%  ±6.69%  ±8.78%
 module/module-loader.js cache='false' n=1000 files=500 dir='rel' name='/'                         1.81 %       ±5.89%  ±7.91% ±10.43%
 module/module-loader.js cache='false' n=1000 files=500 dir='rel' name=''                          1.61 %       ±4.77%  ±6.37%  ±8.33%
 module/module-loader.js cache='false' n=1000 files=500 dir='rel' name='/index.js'                -1.54 %       ±3.50%  ±4.66%  ±6.07%
 module/module-loader.js cache='false' n=1 files=500 dir='abs' name='/'                           -0.47 %       ±5.77%  ±7.69% ±10.02%
 module/module-loader.js cache='false' n=1 files=500 dir='abs' name=''                            -0.13 %       ±8.44% ±11.23% ±14.61%
 module/module-loader.js cache='false' n=1 files=500 dir='abs' name='/index.js'                   -2.37 %       ±5.13%  ±6.83%  ±8.89%
 module/module-loader.js cache='false' n=1 files=500 dir='rel' name='/'                           -0.35 %       ±4.47%  ±5.94%  ±7.73%
 module/module-loader.js cache='false' n=1 files=500 dir='rel' name=''                            -2.24 %       ±4.92%  ±6.55%  ±8.52%
 module/module-loader.js cache='false' n=1 files=500 dir='rel' name='/index.js'                    1.31 %       ±4.47%  ±5.95%  ±7.74%
 module/module-loader.js cache='true' n=1000 files=500 dir='abs' name='/'                         -2.17 %       ±2.28%  ±3.04%  ±3.95%
 module/module-loader.js cache='true' n=1000 files=500 dir='abs' name=''                          -0.13 %       ±1.59%  ±2.11%  ±2.75%
 module/module-loader.js cache='true' n=1000 files=500 dir='abs' name='/index.js'                  1.39 %       ±4.52%  ±6.08%  ±8.05%
 module/module-loader.js cache='true' n=1000 files=500 dir='rel' name='/'                         -1.12 %       ±2.06%  ±2.77%  ±3.64%
 module/module-loader.js cache='true' n=1000 files=500 dir='rel' name=''                           0.29 %       ±2.18%  ±2.91%  ±3.78%
 module/module-loader.js cache='true' n=1000 files=500 dir='rel' name='/index.js'                 -0.66 %       ±5.76%  ±7.66%  ±9.97%
 module/module-loader.js cache='true' n=1 files=500 dir='abs' name='/'                     **      6.20 %       ±4.37%  ±5.88%  ±7.79%
 module/module-loader.js cache='true' n=1 files=500 dir='abs' name=''                             -3.04 %       ±5.49%  ±7.32%  ±9.53%
 module/module-loader.js cache='true' n=1 files=500 dir='abs' name='/index.js'                     3.04 %       ±4.17%  ±5.57%  ±7.30%
 module/module-loader.js cache='true' n=1 files=500 dir='rel' name='/'                             0.78 %       ±4.51%  ±6.00%  ±7.82%
 module/module-loader.js cache='true' n=1 files=500 dir='rel' name=''                             -2.94 %       ±3.47%  ±4.64%  ±6.09%
 module/module-loader.js cache='true' n=1 files=500 dir='rel' name='/index.js'                    -1.87 %       ±5.52%  ±7.41%  ±9.77%

Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case there are 29 comparisons, you can thus
expect the following amount of false-positive results:
  1.45 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.29 false positives, when considering a   1% risk acceptance (**, ***),
  0.03 false positives, when considering a 0.1% risk acceptance (***)

aduh95 added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jan 3, 2021
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 3, 2021

This comment has been minimized.

This comment has been minimized.

Copy link
Copy Markdown
Collaborator

aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 6, 2021
github-actions Bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 6, 2021
PR-URL: nodejs#36680
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
aduh95 force-pushed the module-array-iteration branch from 4310c6b to 5f2bb88 Compare January 6, 2021 10:30

aduh95 commented Jan 6, 2021

Copy link
Copy Markdown
Contributor Author

Landed in 5f2bb88

aduh95 merged commit 5f2bb88 into nodejs:master Jan 6, 2021
aduh95 deleted the module-array-iteration branch January 6, 2021 10:32
danielleadams pushed a commit that referenced this pull request Jan 12, 2021
PR-URL: #36680
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
danielleadams mentioned this pull request Jan 12, 2021
codebytere added a commit to electron/electron that referenced this pull request May 19, 2021
codebytere added a commit to electron/electron that referenced this pull request May 19, 2021
codebytere added a commit to electron/electron that referenced this pull request May 20, 2021
codebytere added a commit to electron/electron that referenced this pull request May 31, 2021
codebytere added a commit to electron/electron that referenced this pull request May 31, 2021
codebytere added a commit to electron/electron that referenced this pull request Jun 8, 2021
codebytere added a commit to electron/electron that referenced this pull request Jun 9, 2021
codebytere added a commit to electron/electron that referenced this pull request Jun 10, 2021
This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. lib / src Issues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL