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

benchmarks: add dgram bind(+/- params) benchmark by vsemozhetbyt · Pull Request #11313 · nodejs/node · GitHub

/ node Public

benchmarks: add dgram bind(+/- params) benchmark - #11313

Closed
vsemozhetbyt wants to merge 1 commit into
nodejs:masterfrom
vsemozhetbyt:dgram-bind-benchmark
Closed

benchmarks: add dgram bind(+/- params) benchmark#11313
vsemozhetbyt wants to merge 1 commit into
nodejs:masterfrom
vsemozhetbyt:dgram-bind-benchmark

Conversation

vsemozhetbyt commented Feb 11, 2017
edited
Loading

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

benchmarks, dgram

This is a benchmark for this case requsted here.

An output from a separate run:
Before fix:

dgram\bind-params.js address="true"  port="true"  n=10000: 122,075.0274095059
dgram\bind-params.js address="false" port="true"  n=10000: 101,787.33470373016
dgram\bind-params.js address="false" port="false" n=10000: 101,181.97238774327

After fix:

dgram\bind-params.js address="true"  port="true"  n=10000: 123,071.85933260615
dgram\bind-params.js address="false" port="true"  n=10000: 123,060.85776592833
dgram\bind-params.js address="false" port="false" n=10000: 124,657.66978190755

An output from a comparing run:

                                                            improvement confidence      p.value
dgram\\bind-params.js address="false" port="false" n=10000      25.09 %        *** 2.923931e-40
dgram\\bind-params.js address="false" port="true"  n=10000      19.35 %        *** 1.138406e-32
dgram\\bind-params.js address="true"  port="true"  n=10000      -0.39 %            4.534955e-01

nodejs-github-bot added the benchmark Issues and PRs related to the benchmark subsystem. label Feb 11, 2017
mscdex added the dgram Issues and PRs related to the dgram subsystem / UDP. label Feb 11, 2017

vsemozhetbyt commented Feb 16, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

//cc @nodejs/benchmarking

jasnell commented Feb 16, 2017

Copy link
Copy Markdown
Member

@mscdex

jasnell requested a review from mscdex February 16, 2017 22:58
Comment thread benchmark/dgram/bind-params.js Outdated

Copy link
Copy Markdown
Contributor

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

Perhaps this section can be omitted entirely (e.g. use address === undefined && port !== undefined for the below conditional)?

Copy link
Copy Markdown
Contributor Author

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

So, in this case, the last else should be replaced by else if (address === undefined && port === undefined), should not it?

Copy link
Copy Markdown
Contributor

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

That's basically what I was suggesting, yes. Except perhaps it would be better to reverse the checks to match the same order used in the first conditional:

} else if (port !== undefined && address === undefined) {

or we could just remove the middle section entirely and it should still work as-is:

} else if (port !== undefined) {

Comment thread benchmark/dgram/bind-params.js Outdated

mscdex Feb 16, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

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

I think this should just use the literal value inline, since it's the only place the variable is used.

Copy link
Copy Markdown
Contributor Author

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

OK. I've just linted with no-magic-numbers, but this is not Node.js mandatory rule. I will fix it.

vsemozhetbyt commented Feb 17, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

@mscdex Fixed (the results of comparing updated).

ChALkeR mentioned this pull request Feb 17, 2017
2 tasks

Copy link
Copy Markdown
Contributor Author

@mscdex @jasnell Could this be landed?

mscdex commented Feb 21, 2017

Copy link
Copy Markdown
Contributor

mscdex commented Feb 21, 2017

Copy link
Copy Markdown
Contributor

Linter shows green, LGTM.

Copy link
Copy Markdown
Member

Landed in 1162e28

addaleax closed this Feb 21, 2017
addaleax pushed a commit that referenced this pull request Feb 21, 2017
Refs: #11242
PR-URL: #11313
Reviewed-By: Brian White <mscdex@mscdex.net>
vsemozhetbyt deleted the dgram-bind-benchmark branch February 21, 2017 19:25
addaleax pushed a commit that referenced this pull request Feb 22, 2017
Refs: #11242
PR-URL: #11313
Reviewed-By: Brian White <mscdex@mscdex.net>
italoacasas mentioned this pull request Feb 25, 2017
jasnell pushed a commit that referenced this pull request Mar 7, 2017
Refs: #11242
PR-URL: #11313
Reviewed-By: Brian White <mscdex@mscdex.net>
jasnell pushed a commit that referenced this pull request Mar 7, 2017
Refs: #11242
PR-URL: #11313
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
Refs: #11242
PR-URL: #11313
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins mentioned this pull request Mar 9, 2017
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
Refs: #11242
PR-URL: #11313
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins mentioned this pull request Mar 9, 2017
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

benchmark Issues and PRs related to the benchmark subsystem. dgram Issues and PRs related to the dgram subsystem / UDP.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL