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

dgram: refactor to use more primordials #36286

Closed
wants to merge 1 commit into from

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Nov 26, 2020

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

@nodejs-github-bot nodejs-github-bot added the dgram Issues and PRs related to the dgram subsystem / UDP. label Nov 26, 2020
@Trott

This comment has been minimized.

@aduh95
Copy link
Contributor Author

aduh95 commented Nov 28, 2020

Benchmark results:

                                                                       confidence improvement accuracy (*)   (**)  (***)
dgram/array-vs-concat.js dur=5 type='concat' chunks=1 num=100 len=64            *      1.62 %       ±1.33% ±1.78% ±2.31%
dgram/array-vs-concat.js dur=5 type='concat' chunks=4 num=100 len=64            *      2.41 %       ±2.05% ±2.74% ±3.57%
dgram/array-vs-concat.js dur=5 type='concat' chunks=8 num=100 len=1024          *      2.41 %       ±2.16% ±2.88% ±3.76%
dgram/array-vs-concat.js dur=5 type='multi' chunks=1 num=100 len=1024          **      3.01 %       ±2.06% ±2.75% ±3.58%
dgram/array-vs-concat.js dur=5 type='multi' chunks=1 num=100 len=64             *      2.40 %       ±2.13% ±2.83% ±3.69%
dgram/offset-length.js dur=5 type='recv' num=100 len=64                         *      2.22 %       ±1.74% ±2.31% ±3.01%
dgram/single-buffer.js dur=5 type='recv' num=100 len=256                        *      2.74 %       ±2.29% ±3.05% ±3.97%
dgram/single-buffer.js dur=5 type='recv' num=100 len=64                         *     -3.24 %       ±2.98% ±3.97% ±5.17%
dgram/single-buffer.js dur=5 type='send' num=100 len=256                       **      4.12 %       ±2.40% ±3.20% ±4.16%
                                                                       confidence improvement accuracy (*)   (**)  (***)
dgram/array-vs-concat.js dur=5 type='concat' chunks=1 num=100 len=1024                -0.08 %       ±2.48% ±3.30% ±4.31%
dgram/array-vs-concat.js dur=5 type='concat' chunks=1 num=100 len=256                 -0.73 %       ±2.05% ±2.73% ±3.57%
dgram/array-vs-concat.js dur=5 type='concat' chunks=1 num=100 len=512                  0.10 %       ±2.23% ±2.97% ±3.87%
dgram/array-vs-concat.js dur=5 type='concat' chunks=1 num=100 len=64            *      1.62 %       ±1.33% ±1.78% ±2.31%
dgram/array-vs-concat.js dur=5 type='concat' chunks=2 num=100 len=1024                -0.08 %       ±2.23% ±2.97% ±3.87%
dgram/array-vs-concat.js dur=5 type='concat' chunks=2 num=100 len=256                  1.92 %       ±2.26% ±3.01% ±3.92%
dgram/array-vs-concat.js dur=5 type='concat' chunks=2 num=100 len=512                  1.33 %       ±2.21% ±2.95% ±3.84%
dgram/array-vs-concat.js dur=5 type='concat' chunks=2 num=100 len=64                   1.06 %       ±2.03% ±2.70% ±3.52%
dgram/array-vs-concat.js dur=5 type='concat' chunks=4 num=100 len=1024                 1.07 %       ±2.92% ±3.88% ±5.06%
dgram/array-vs-concat.js dur=5 type='concat' chunks=4 num=100 len=256                 -1.28 %       ±1.89% ±2.52% ±3.31%
dgram/array-vs-concat.js dur=5 type='concat' chunks=4 num=100 len=512                  1.42 %       ±2.07% ±2.76% ±3.60%
dgram/array-vs-concat.js dur=5 type='concat' chunks=4 num=100 len=64            *      2.41 %       ±2.05% ±2.74% ±3.57%
dgram/array-vs-concat.js dur=5 type='concat' chunks=8 num=100 len=1024          *      2.41 %       ±2.16% ±2.88% ±3.76%
dgram/array-vs-concat.js dur=5 type='concat' chunks=8 num=100 len=256                  2.09 %       ±2.61% ±3.48% ±4.55%
dgram/array-vs-concat.js dur=5 type='concat' chunks=8 num=100 len=512                  1.57 %       ±3.00% ±3.99% ±5.20%
dgram/array-vs-concat.js dur=5 type='concat' chunks=8 num=100 len=64                   2.42 %       ±3.16% ±4.20% ±5.47%
dgram/array-vs-concat.js dur=5 type='multi' chunks=1 num=100 len=1024          **      3.01 %       ±2.06% ±2.75% ±3.58%
dgram/array-vs-concat.js dur=5 type='multi' chunks=1 num=100 len=256                   1.21 %       ±2.78% ±3.70% ±4.82%
dgram/array-vs-concat.js dur=5 type='multi' chunks=1 num=100 len=512                   1.51 %       ±2.55% ±3.40% ±4.42%
dgram/array-vs-concat.js dur=5 type='multi' chunks=1 num=100 len=64             *      2.40 %       ±2.13% ±2.83% ±3.69%
dgram/array-vs-concat.js dur=5 type='multi' chunks=2 num=100 len=1024                  0.38 %       ±2.79% ±3.72% ±4.84%
dgram/array-vs-concat.js dur=5 type='multi' chunks=2 num=100 len=256                   0.19 %       ±2.21% ±2.94% ±3.83%
dgram/array-vs-concat.js dur=5 type='multi' chunks=2 num=100 len=512                   1.39 %       ±2.45% ±3.26% ±4.24%
dgram/array-vs-concat.js dur=5 type='multi' chunks=2 num=100 len=64                   -1.24 %       ±1.53% ±2.05% ±2.67%
dgram/array-vs-concat.js dur=5 type='multi' chunks=4 num=100 len=1024                  0.84 %       ±2.97% ±3.95% ±5.14%
dgram/array-vs-concat.js dur=5 type='multi' chunks=4 num=100 len=256                   0.55 %       ±1.79% ±2.39% ±3.12%
dgram/array-vs-concat.js dur=5 type='multi' chunks=4 num=100 len=512                   1.33 %       ±2.39% ±3.18% ±4.13%
dgram/array-vs-concat.js dur=5 type='multi' chunks=4 num=100 len=64                    1.60 %       ±2.17% ±2.89% ±3.76%
dgram/array-vs-concat.js dur=5 type='multi' chunks=8 num=100 len=1024                  1.72 %       ±2.77% ±3.69% ±4.80%
dgram/array-vs-concat.js dur=5 type='multi' chunks=8 num=100 len=256                  -0.45 %       ±2.33% ±3.11% ±4.06%
dgram/array-vs-concat.js dur=5 type='multi' chunks=8 num=100 len=512                   1.35 %       ±3.37% ±4.48% ±5.83%
dgram/array-vs-concat.js dur=5 type='multi' chunks=8 num=100 len=64                   -0.25 %       ±2.15% ±2.87% ±3.74%
dgram/bind-params.js address='false' port='false' n=10000                              1.18 %       ±5.17% ±6.87% ±8.95%
dgram/bind-params.js address='false' port='true' n=10000                               0.42 %       ±3.94% ±5.25% ±6.83%
dgram/bind-params.js address='true' port='true' n=10000                                0.87 %       ±5.28% ±7.04% ±9.18%
dgram/multi-buffer.js dur=5 type='recv' chunks=1 num=100 len=1024                      0.31 %       ±2.84% ±3.78% ±4.93%
dgram/multi-buffer.js dur=5 type='recv' chunks=1 num=100 len=256                       0.37 %       ±2.98% ±3.96% ±5.16%
dgram/multi-buffer.js dur=5 type='recv' chunks=1 num=100 len=64                       -0.59 %       ±1.54% ±2.06% ±2.69%
dgram/multi-buffer.js dur=5 type='recv' chunks=2 num=100 len=1024                      0.57 %       ±2.19% ±2.92% ±3.80%
dgram/multi-buffer.js dur=5 type='recv' chunks=2 num=100 len=256                      -0.90 %       ±2.64% ±3.51% ±4.57%
dgram/multi-buffer.js dur=5 type='recv' chunks=2 num=100 len=64                        0.78 %       ±1.87% ±2.49% ±3.25%
dgram/multi-buffer.js dur=5 type='recv' chunks=4 num=100 len=1024                      0.20 %       ±2.52% ±3.36% ±4.38%
dgram/multi-buffer.js dur=5 type='recv' chunks=4 num=100 len=256                      -1.57 %       ±1.95% ±2.59% ±3.38%
dgram/multi-buffer.js dur=5 type='recv' chunks=4 num=100 len=64                        1.59 %       ±2.15% ±2.86% ±3.73%
dgram/multi-buffer.js dur=5 type='recv' chunks=8 num=100 len=1024                     -0.47 %       ±2.16% ±2.88% ±3.75%
dgram/multi-buffer.js dur=5 type='recv' chunks=8 num=100 len=256                       0.13 %       ±1.90% ±2.53% ±3.30%
dgram/multi-buffer.js dur=5 type='recv' chunks=8 num=100 len=64                        1.44 %       ±1.86% ±2.48% ±3.24%
dgram/multi-buffer.js dur=5 type='send' chunks=1 num=100 len=1024                     -1.03 %       ±2.28% ±3.04% ±3.97%
dgram/multi-buffer.js dur=5 type='send' chunks=1 num=100 len=256                       0.75 %       ±3.19% ±4.24% ±5.52%
dgram/multi-buffer.js dur=5 type='send' chunks=1 num=100 len=64                        1.70 %       ±2.83% ±3.77% ±4.91%
dgram/multi-buffer.js dur=5 type='send' chunks=2 num=100 len=1024                      1.32 %       ±2.61% ±3.47% ±4.52%
dgram/multi-buffer.js dur=5 type='send' chunks=2 num=100 len=256                       2.64 %       ±2.72% ±3.62% ±4.71%
dgram/multi-buffer.js dur=5 type='send' chunks=2 num=100 len=64                        0.19 %       ±1.77% ±2.36% ±3.08%
dgram/multi-buffer.js dur=5 type='send' chunks=4 num=100 len=1024                      0.14 %       ±2.60% ±3.47% ±4.54%
dgram/multi-buffer.js dur=5 type='send' chunks=4 num=100 len=256                       0.11 %       ±2.01% ±2.68% ±3.48%
dgram/multi-buffer.js dur=5 type='send' chunks=4 num=100 len=64                        2.42 %       ±2.53% ±3.38% ±4.41%
dgram/multi-buffer.js dur=5 type='send' chunks=8 num=100 len=1024                      0.92 %       ±1.84% ±2.45% ±3.20%
dgram/multi-buffer.js dur=5 type='send' chunks=8 num=100 len=256                      -0.46 %       ±2.99% ±3.99% ±5.21%
dgram/multi-buffer.js dur=5 type='send' chunks=8 num=100 len=64                        0.23 %       ±2.35% ±3.13% ±4.09%
dgram/offset-length.js dur=5 type='recv' num=100 len=1                                 1.32 %       ±2.88% ±3.84% ±5.01%
dgram/offset-length.js dur=5 type='recv' num=100 len=1024                              0.19 %       ±2.08% ±2.77% ±3.61%
dgram/offset-length.js dur=5 type='recv' num=100 len=256                               1.64 %       ±1.77% ±2.36% ±3.07%
dgram/offset-length.js dur=5 type='recv' num=100 len=64                         *      2.22 %       ±1.74% ±2.31% ±3.01%
dgram/offset-length.js dur=5 type='send' num=100 len=1                                 0.01 %       ±2.32% ±3.08% ±4.01%
dgram/offset-length.js dur=5 type='send' num=100 len=1024                             -1.95 %       ±2.66% ±3.54% ±4.62%
dgram/offset-length.js dur=5 type='send' num=100 len=256                              -0.92 %       ±2.77% ±3.69% ±4.83%
dgram/offset-length.js dur=5 type='send' num=100 len=64                                1.23 %       ±2.29% ±3.05% ±3.97%
dgram/single-buffer.js dur=5 type='recv' num=100 len=1                                 2.41 %       ±2.70% ±3.59% ±4.68%
dgram/single-buffer.js dur=5 type='recv' num=100 len=1024                              1.70 %       ±2.96% ±3.94% ±5.14%
dgram/single-buffer.js dur=5 type='recv' num=100 len=256                        *      2.74 %       ±2.29% ±3.05% ±3.97%
dgram/single-buffer.js dur=5 type='recv' num=100 len=64                         *     -3.24 %       ±2.98% ±3.97% ±5.17%
dgram/single-buffer.js dur=5 type='send' num=100 len=1                                 1.42 %       ±3.53% ±4.70% ±6.12%
dgram/single-buffer.js dur=5 type='send' num=100 len=1024                              0.50 %       ±3.12% ±4.16% ±5.43%
dgram/single-buffer.js dur=5 type='send' num=100 len=256                       **      4.12 %       ±2.40% ±3.20% ±4.16%
dgram/single-buffer.js dur=5 type='send' num=100 len=64                                0.81 %       ±3.48% ±4.64% ±6.03%

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

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 2, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 2, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 2, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 2, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 2, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 2, 2020
@nodejs-github-bot

This comment has been minimized.

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 2, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 2, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Dec 3, 2020

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 4, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 4, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2020

Landed in d1e4d34...e074bee

@github-actions github-actions bot closed this Dec 4, 2020
nodejs-github-bot pushed a commit that referenced this pull request Dec 4, 2020
PR-URL: #36286
Reviewed-By: Rich Trott <rtrott@gmail.com>
@aduh95 aduh95 deleted the dgram-primordials branch December 4, 2020 18:35
danielleadams pushed a commit that referenced this pull request Dec 7, 2020
PR-URL: #36286
Reviewed-By: Rich Trott <rtrott@gmail.com>
@danielleadams danielleadams mentioned this pull request Dec 7, 2020
cjihrig pushed a commit to cjihrig/node that referenced this pull request Dec 8, 2020
PR-URL: nodejs#36286
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request May 16, 2021
PR-URL: #36286
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request Jun 11, 2021
PR-URL: #36286
Reviewed-By: Rich Trott <rtrott@gmail.com>
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 pending requests for changes, and a CI started. dgram Issues and PRs related to the dgram subsystem / UDP.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants