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

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
@nodejs-github-bot

This comment has been minimized.

@ZYSzys
ZYSzys approved these changes Aug 3, 2019
@cjihrig
cjihrig approved these changes Aug 3, 2019
lib/path.js Show resolved Hide resolved
@Trott
Trott approved these changes Aug 4, 2019
@lpinca
lpinca approved these changes Aug 4, 2019
@trivikr
trivikr approved these changes Aug 5, 2019
@devsnek
devsnek approved these changes Aug 5, 2019
@ZYSzys

This comment has been minimized.

Copy link
Member

commented Aug 5, 2019

Landed in 37d2748.

@ZYSzys ZYSzys closed this Aug 5, 2019

ZYSzys added a commit to zys-contribs/node that referenced this pull request Aug 5, 2019
path: improve normalization performance
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 mscdex:path-perf-normalize branch Aug 5, 2019

BridgeAR added a commit that referenced this pull request Aug 6, 2019
path: improve normalization performance
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>
@BridgeAR BridgeAR referenced this pull request Aug 6, 2019
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
path: improve normalization performance
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>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
path: improve normalization performance
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.