querystring: simplify stringify method by ZYSzys · Pull Request #26591 · nodejs/node (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation11 Commits1 Checks0 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

ZYSzys

Since there is no obvious improvement in stringify method, try to simplify stringify method without performance regression.

Checklist

@mscdex

mscdex

@ZYSzys

CI: https://ci.nodejs.org/job/node-test-pull-request/21657/

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/305/console

17:41:31                                                                    confidence improvement accuracy (*)   (**)  (***)
17:41:31  querystring/querystring-stringify.js n=10000000 type='array'                      0.27 %       ±0.97% ±1.30% ±1.69%
17:41:31  querystring/querystring-stringify.js n=10000000 type='array0'            ***      2.52 %       ±0.88% ±1.17% ±1.52%
17:41:31  querystring/querystring-stringify.js n=10000000 type='encodelast'                -0.09 %       ±1.05% ±1.40% ±1.82%
17:41:31  querystring/querystring-stringify.js n=10000000 type='encodemany'                -0.77 %       ±1.14% ±1.52% ±1.99%
17:41:31  querystring/querystring-stringify.js n=10000000 type='noencode'                   1.01 %       ±1.70% ±2.27% ±2.95%

So slightly the performance improved, but at least an improvement right ?

/cc @mscdex @BridgeAR PTAL :)

BridgeAR

Choose a reason for hiding this comment

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

The code changes are LGTM. The case optimized is very rare, thus adding extra benchmark types does not seem right to me.

BridgeAR

@BridgeAR BridgeAR added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Mar 25, 2019

@nodejs-github-bot

@ZYSzys

@ZYSzys ZYSzys changed the titlequerystring: slightly improve stringify performance querystring: simplify stringify method

Mar 27, 2019

@nodejs-github-bot

@nodejs-github-bot

BridgeAR pushed a commit to BridgeAR/node that referenced this pull request

Apr 4, 2019

@ZYSzys @BridgeAR

PR-URL: nodejs#26591 Reviewed-By: Ruben Bridgewater ruben@bridgewater.de

@BridgeAR

BethGriggs pushed a commit that referenced this pull request

Apr 9, 2019

@ZYSzys @BethGriggs

PR-URL: #26591 Reviewed-By: Ruben Bridgewater ruben@bridgewater.de Signed-off-by: Beth Griggs Bethany.Griggs@uk.ibm.com

BethGriggs pushed a commit that referenced this pull request

Apr 10, 2019

@ZYSzys @BethGriggs

PR-URL: #26591 Reviewed-By: Ruben Bridgewater ruben@bridgewater.de Signed-off-by: Beth Griggs Bethany.Griggs@uk.ibm.com

Labels

author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

querystring

Issues and PRs related to the built-in querystring module.