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

path: improve normalization performance #28948

Closed
wants to merge 1 commit into from

Conversation

mscdex
Copy link
Contributor

@mscdex mscdex commented Aug 3, 2019

Some results:

                                                                                             confidence improvement accuracy (*)   (**)  (***)
path/normalize-posix.js n=10000000 path='.'                                                        ***      8.62 %       ±1.91% ±2.54% ±3.30%
path/normalize-posix.js n=10000000 path=''                                                         ***      8.71 %       ±2.00% ±2.67% ±3.49%
path/normalize-posix.js n=10000000 path='/../'                                                     ***      7.54 %       ±1.97% ±2.64% ±3.46%
path/normalize-posix.js n=10000000 path='/foo'                                                     ***     16.09 %       ±2.77% ±3.71% ±4.88%
path/normalize-posix.js n=10000000 path='/foo/bar'                                                 ***     11.90 %       ±1.86% ±2.47% ±3.22%
path/normalize-posix.js n=10000000 path='/foo/bar//baz/asdf/quux/..'                               ***      9.30 %       ±1.98% ±2.64% ±3.45%
path/normalize-win32.js n=10000000 path='.'                                                        ***      4.80 %       ±1.29% ±1.73% ±2.28%
path/normalize-win32.js n=10000000 path=''                                                         ***      4.49 %       ±0.94% ±1.26% ±1.66%
path/normalize-win32.js n=10000000 path='C:\\\\..\\\\'                                                      1.48 %       ±1.56% ±2.08% ±2.72%
path/normalize-win32.js n=10000000 path='C:\\\\foo'                                                ***      3.33 %       ±1.61% ±2.14% ±2.80%
path/normalize-win32.js n=10000000 path='C:\\\\foo\\\\bar'                                          **      2.26 %       ±1.39% ±1.86% ±2.42%
path/normalize-win32.js n=10000000 path='C:\\\\foo\\\\bar\\\\\\\\baz\\\\asdf\\\\quux\\\\..'                 0.35 %       ±1.28% ±1.71% ±2.24%
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@mscdex mscdex added path Issues and PRs related to the path subsystem. performance Issues and PRs related to the performance of Node.js. dont-land-on-v8.x labels Aug 3, 2019
@nodejs-github-bot
Copy link
Collaborator

@mscdex mscdex added wip Issues and PRs that are still a work in progress. and removed wip Issues and PRs that are still a work in progress. labels Aug 3, 2019
lib/path.js Show resolved Hide resolved
@ZYSzys
Copy link
Member

ZYSzys commented Aug 5, 2019

Landed in 37d2748.

@ZYSzys ZYSzys closed this Aug 5, 2019
ZYSzys pushed a commit to zys-contrib/node that referenced this pull request Aug 5, 2019
PR-URL: nodejs#28948
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
@mscdex mscdex deleted the path-perf-normalize branch August 5, 2019 13:02
BridgeAR pushed a commit that referenced this pull request Aug 6, 2019
PR-URL: #28948
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
path Issues and PRs related to the path subsystem. performance Issues and PRs related to the performance of Node.js.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants