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: remove StringPrototypeCharCodeAt from some methods of posix #54668

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HBSPS
Copy link
Contributor

@HBSPS HBSPS commented Aug 31, 2024

                                                                          confidence improvement accuracy (*)   (**)  (***)
path/normalize-posix.js n=100000 path='.'                                        ***      7.77 %       ±1.84% ±2.44% ±3.18%
path/normalize-posix.js n=100000 path=''                                                  3.09 %       ±4.67% ±6.27% ±8.28%
path/normalize-posix.js n=100000 path='/../'                                       *      2.57 %       ±1.97% ±2.62% ±3.41%
path/normalize-posix.js n=100000 path='/foo'                                       *      2.54 %       ±1.94% ±2.57% ±3.35%
path/normalize-posix.js n=100000 path='/foo/bar'                                          1.30 %       ±1.99% ±2.65% ±3.45%
path/normalize-posix.js n=100000 path='/foo/bar//baz/asdf/quux/..'                        0.70 %       ±1.78% ±2.37% ±3.08%
path/parse-posix.js n=100000 path=''                                                     -0.82 %       ±2.25% ±2.99% ±3.90%
path/parse-posix.js n=100000 path='/'                                             **      2.35 %       ±1.62% ±2.16% ±2.81%
path/parse-posix.js n=100000 path='/foo'                                           *      2.01 %       ±1.95% ±2.59% ±3.37%
path/parse-posix.js n=100000 path='/foo/bar.baz'                                  **      1.66 %       ±1.22% ±1.62% ±2.11%
path/parse-posix.js n=100000 path='/foo/bar/baz/asdf/.quux'                               0.74 %       ±1.46% ±1.95% ±2.53%
path/parse-posix.js n=100000 path='foo/.bar.baz'                                         -0.93 %       ±1.32% ±1.76% ±2.29%
path/parse-posix.js n=100000 path='foo/bar'                                               1.32 %       ±1.36% ±1.82% ±2.37%
path/resolve-posix.js n=100000 paths=''                                                   1.57 %       ±2.29% ±3.06% ±4.04%
path/resolve-posix.js n=100000 paths='|'                                          **      1.10 %       ±0.78% ±1.03% ±1.34%
path/resolve-posix.js n=100000 paths='a/b/c/|../../..'                                    0.47 %       ±0.71% ±0.95% ±1.23%
path/resolve-posix.js n=100000 paths='foo/bar|/tmp/file/|..|a/../subfile'                -0.00 %       ±1.20% ±1.60% ±2.08%

Refs: #54546

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. path Issues and PRs related to the path subsystem. labels Aug 31, 2024
@RedYetiDev RedYetiDev added the needs-benchmark-ci PR that need a benchmark CI run. label Aug 31, 2024
Copy link
Member

@RedYetiDev RedYetiDev left a comment

Choose a reason for hiding this comment

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

IMO the commit message / title is a bit misleading, as this isn't removing the primordial everywhere, maybe reword?

lib/path.js Outdated
@@ -1543,8 +1540,8 @@ const posix = {

// Get non-dir info
for (; i >= start; --i) {
const code = StringPrototypeCharCodeAt(path, i);
if (code === CHAR_FORWARD_SLASH) {
const code = path[i];
Copy link
Member

Choose a reason for hiding this comment

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

Maybe rename this variable to char?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I applied it!

Remove `StringPrototypeCharCodeAt` from `posix.resolve`,
`posix.normalize`, `posix.parse`
@HBSPS HBSPS changed the title path: remove StringPrototypeCharCodeAt from lib/path path: remove StringPrototypeCharCodeAt from some methods of posix Aug 31, 2024
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.33%. Comparing base (0b120af) to head (317684d).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #54668   +/-   ##
=======================================
  Coverage   87.33%   87.33%           
=======================================
  Files         650      650           
  Lines      182842   182839    -3     
  Branches    35067    35059    -8     
=======================================
+ Hits       159683   159688    +5     
- Misses      16418    16424    +6     
+ Partials     6741     6727   -14     
Files with missing lines Coverage Δ
lib/path.js 95.16% <100.00%> (-0.01%) ⬇️

... and 26 files with indirect coverage changes

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 31, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 31, 2024
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Aug 31, 2024

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

Benchmark CI (path): https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1628/

Results
                                                                                                                       confidence improvement accuracy (*)   (**)  (***)
path/basename-posix.js n=100000 pathext=''                                                                                             0.87 %       ±1.40% ±1.86% ±2.43%
path/basename-posix.js n=100000 pathext='/'                                                                                           -0.54 %       ±0.99% ±1.32% ±1.72%
path/basename-posix.js n=100000 pathext='/foo'                                                                                         0.10 %       ±1.00% ±1.33% ±1.73%
path/basename-posix.js n=100000 pathext='/foo/.bar.baz'                                                                                1.96 %       ±2.36% ±3.17% ±4.17%
path/basename-posix.js n=100000 pathext='/foo/.bar.baz|.baz'                                                                           1.29 %       ±2.28% ±3.04% ±3.96%
path/basename-posix.js n=100000 pathext='/foo/bar/baz/asdf/quux.html'                                                                  0.93 %       ±1.70% ±2.27% ±2.97%
path/basename-posix.js n=100000 pathext='/foo/bar/baz/asdf/quux.html|.html'                                                           -1.84 %       ±2.77% ±3.69% ±4.82%
path/basename-posix.js n=100000 pathext='foo'                                                                                         -0.41 %       ±0.86% ±1.14% ±1.49%
path/basename-posix.js n=100000 pathext='foo/bar.'                                                                                    -0.26 %       ±0.56% ±0.74% ±0.96%
path/basename-posix.js n=100000 pathext='foo/bar.|.'                                                                                  -0.59 %       ±1.95% ±2.59% ±3.38%
path/basename-win32.js n=100000 pathext=''                                                                                             0.29 %       ±1.86% ±2.49% ±3.25%
path/basename-win32.js n=100000 pathext='\\\\foo\\\\bar\\\\baz\\\\asdf\\\\quux.html'                                                   0.77 %       ±2.20% ±2.93% ±3.82%
path/basename-win32.js n=100000 pathext='\\\\foo\\\\bar\\\\baz\\\\asdf\\\\quux.html|.html'                                             1.60 %       ±3.41% ±4.54% ±5.91%
path/basename-win32.js n=100000 pathext='C:\\\\'                                                                                       0.72 %       ±1.16% ±1.55% ±2.04%
path/basename-win32.js n=100000 pathext='C:\\\\foo'                                                                                    0.25 %       ±0.61% ±0.81% ±1.05%
path/basename-win32.js n=100000 pathext='D:\\\\foo\\\\.bar.baz'                                                                       -0.54 %       ±1.71% ±2.27% ±2.96%
path/basename-win32.js n=100000 pathext='E:\\\\foo\\\\.bar.baz|.baz'                                                            *     -2.18 %       ±1.82% ±2.45% ±3.24%
path/basename-win32.js n=100000 pathext='foo'                                                                                         -0.20 %       ±0.97% ±1.29% ±1.68%
path/basename-win32.js n=100000 pathext='foo\\\\bar.'                                                                                 -0.57 %       ±1.32% ±1.76% ±2.30%
path/basename-win32.js n=100000 pathext='foo\\\\bar.|.'                                                                               -0.70 %       ±2.54% ±3.39% ±4.41%
path/dirname-posix.js n=100000 path=''                                                                                                -0.00 %       ±1.67% ±2.23% ±2.90%
path/dirname-posix.js n=100000 path='/'                                                                                               -0.35 %       ±1.02% ±1.36% ±1.78%
path/dirname-posix.js n=100000 path='/foo'                                                                                            -0.93 %       ±1.96% ±2.62% ±3.44%
path/dirname-posix.js n=100000 path='/foo/bar'                                                                                        -0.17 %       ±0.79% ±1.05% ±1.37%
path/dirname-posix.js n=100000 path='/foo/bar/baz/asdf/quux'                                                                          -0.54 %       ±1.05% ±1.40% ±1.82%
path/dirname-posix.js n=100000 path='foo'                                                                                             -0.08 %       ±1.57% ±2.09% ±2.72%
path/dirname-posix.js n=100000 path='foo/bar'                                                                                         -0.34 %       ±0.89% ±1.19% ±1.55%
path/dirname-win32.js n=100000 path=''                                                                                                -0.68 %       ±0.99% ±1.32% ±1.72%
path/dirname-win32.js n=100000 path='\\\\'                                                                                             1.61 %       ±2.17% ±2.92% ±3.85%
path/dirname-win32.js n=100000 path='\\\\foo'                                                                                         -0.62 %       ±0.72% ±0.96% ±1.25%
path/dirname-win32.js n=100000 path='C:\\\\foo\\\\bar'                                                                                -0.30 %       ±2.13% ±2.84% ±3.70%
path/dirname-win32.js n=100000 path='D:\\\\foo\\\\bar\\\\baz\\\\asdf\\\\quux'                                                          0.48 %       ±2.28% ±3.03% ±3.94%
path/dirname-win32.js n=100000 path='foo'                                                                                              0.89 %       ±1.60% ±2.14% ±2.80%
path/dirname-win32.js n=100000 path='foo\\\\bar'                                                                                      -0.84 %       ±0.98% ±1.31% ±1.70%
path/extname-posix.js n=100000 path=''                                                                                                -0.61 %       ±2.04% ±2.72% ±3.56%
path/extname-posix.js n=100000 path='/'                                                                                               -0.25 %       ±1.98% ±2.65% ±3.48%
path/extname-posix.js n=100000 path='/foo'                                                                                             1.16 %       ±1.56% ±2.08% ±2.72%
path/extname-posix.js n=100000 path='/foo/bar/baz/asdf/quux.foobarbazasdfquux'                                                         2.47 %       ±2.60% ±3.47% ±4.54%
path/extname-posix.js n=100000 path='/foo/bar/baz/asdf/quux'                                                                           0.76 %       ±1.88% ±2.50% ±3.26%
path/extname-posix.js n=100000 path='foo/.bar.baz'                                                                                     0.41 %       ±0.99% ±1.31% ±1.71%
path/extname-posix.js n=100000 path='foo/bar/...baz.quux'                                                                             -0.35 %       ±1.85% ±2.49% ±3.28%
path/extname-posix.js n=100000 path='foo/bar/..baz.quux'                                                                              -0.47 %       ±1.35% ±1.82% ±2.39%
path/extname-posix.js n=100000 path='index.html'                                                                               **      1.00 %       ±0.60% ±0.80% ±1.04%
path/extname-posix.js n=100000 path='index'                                                                                   ***     -5.27 %       ±1.75% ±2.34% ±3.05%
path/extname-win32.js n=100000 path=''                                                                                                -1.48 %       ±2.48% ±3.29% ±4.29%
path/extname-win32.js n=100000 path='\\\\'                                                                                             0.06 %       ±1.80% ±2.40% ±3.13%
path/extname-win32.js n=100000 path='\\\\foo\\\\bar\\\\baz\\\\asdf\\\\quux.foobarbazasdfquux'                                          0.51 %       ±2.10% ±2.80% ±3.64%
path/extname-win32.js n=100000 path='C:\\\\foo'                                                                                       -0.72 %       ±1.56% ±2.08% ±2.72%
path/extname-win32.js n=100000 path='D:\\\\foo\\\\bar\\\\baz\\\\asdf\\\\quux'                                                   *     -0.52 %       ±0.46% ±0.62% ±0.80%
path/extname-win32.js n=100000 path='foo\\\\.bar.baz'                                                                           *      2.30 %       ±2.03% ±2.71% ±3.57%
path/extname-win32.js n=100000 path='foo\\\\bar\\\\...baz.quux'                                                                       -0.10 %       ±1.98% ±2.64% ±3.44%
path/extname-win32.js n=100000 path='foo\\\\bar\\\\..baz.quux'                                                                         0.11 %       ±0.58% ±0.77% ±1.00%
path/extname-win32.js n=100000 path='index.html'                                                                                      -0.06 %       ±0.96% ±1.28% ±1.67%
path/extname-win32.js n=100000 path='index'                                                                                            0.37 %       ±1.52% ±2.03% ±2.65%
path/format-posix.js n=1000000 props='/|/home/user/dir|index.html|.html|index'                                                        -0.14 %       ±1.22% ±1.62% ±2.11%
path/format-win32.js n=1000000 props='C:\\\\|C:\\\\path\\\\dir|index.html|.html|index'                                                 0.69 %       ±0.74% ±0.98% ±1.28%
path/isAbsolute-posix.js n=100000 path='.'                                                                                            -1.76 %       ±2.27% ±3.04% ±4.00%
path/isAbsolute-posix.js n=100000 path=''                                                                                             -2.44 %       ±3.69% ±4.91% ±6.39%
path/isAbsolute-posix.js n=100000 path='/baz/..'                                                                                       0.18 %       ±1.57% ±2.09% ±2.73%
path/isAbsolute-posix.js n=100000 path='/foo/bar'                                                                                     -0.33 %       ±1.39% ±1.85% ±2.42%
path/isAbsolute-posix.js n=100000 path='bar/baz'                                                                                      -1.74 %       ±1.98% ±2.66% ±3.51%
path/isAbsolute-win32.js n=100000 path='.'                                                                                            -0.38 %       ±1.10% ±1.47% ±1.91%
path/isAbsolute-win32.js n=100000 path=''                                                                                             -0.38 %       ±1.39% ±1.85% ±2.40%
path/isAbsolute-win32.js n=100000 path='//server'                                                                                     -0.09 %       ±0.83% ±1.10% ±1.43%
path/isAbsolute-win32.js n=100000 path='bar\\\\baz'                                                                                    0.42 %       ±1.31% ±1.75% ±2.29%
path/isAbsolute-win32.js n=100000 path='C:\\\\baz\\\\..'                                                                               0.87 %       ±1.38% ±1.84% ±2.41%
path/isAbsolute-win32.js n=100000 path='C:baz\\\\..'                                                                                   0.12 %       ±0.70% ±0.93% ±1.22%
path/join-posix.js n=100000 paths='/foo|bar||baz/asdf|quux|..'                                                                         0.16 %       ±0.88% ±1.17% ±1.53%
path/join-win32.js n=100000 paths='C:\\\\foo|bar||baz\\\\asdf|quux|..'                                                                -0.86 %       ±0.89% ±1.19% ±1.56%
path/makeLong-win32.js n=100000 path='\\\\\\\\?\\\\foo'                                                                               -0.09 %       ±0.84% ±1.11% ±1.45%
path/makeLong-win32.js n=100000 path='\\\\\\\\foo\\\\bar'                                                                             -0.74 %       ±1.51% ±2.03% ±2.66%
path/makeLong-win32.js n=100000 path='C:\\\\foo'                                                                                       0.08 %       ±1.24% ±1.66% ±2.17%
path/makeLong-win32.js n=100000 path='foo\\\\bar'                                                                                      0.61 %       ±0.71% ±0.95% ±1.24%
path/normalize-posix.js n=100000 path='.'                                                                                     ***      3.54 %       ±1.08% ±1.44% ±1.88%
path/normalize-posix.js n=100000 path=''                                                                                      ***     -4.41 %       ±1.27% ±1.69% ±2.19%
path/normalize-posix.js n=100000 path='/../'                                                                                  ***      3.22 %       ±1.35% ±1.81% ±2.38%
path/normalize-posix.js n=100000 path='/foo'                                                                                          -0.31 %       ±1.50% ±1.99% ±2.60%
path/normalize-posix.js n=100000 path='/foo/bar'                                                                                *      2.67 %       ±2.58% ±3.43% ±4.46%
path/normalize-posix.js n=100000 path='/foo/bar//baz/asdf/quux/..'                                                                     0.28 %       ±1.29% ±1.72% ±2.26%
path/normalize-win32.js n=100000 path='.'                                                                                             -0.49 %       ±2.45% ±3.26% ±4.25%
path/normalize-win32.js n=100000 path=''                                                                                        *      2.28 %       ±2.19% ±2.93% ±3.82%
path/normalize-win32.js n=100000 path='C:\\\\..\\\\'                                                                                  -0.66 %       ±1.32% ±1.76% ±2.30%
path/normalize-win32.js n=100000 path='C:\\\\foo'                                                                                     -0.18 %       ±2.00% ±2.66% ±3.47%
path/normalize-win32.js n=100000 path='C:\\\\foo\\\\bar'                                                                               1.10 %       ±1.36% ±1.83% ±2.41%
path/normalize-win32.js n=100000 path='C:\\\\foo\\\\bar\\\\\\\\baz\\\\asdf\\\\quux\\\\..'                                              0.51 %       ±0.88% ±1.18% ±1.53%
path/parse-posix.js n=100000 path=''                                                                                          ***     -6.49 %       ±2.15% ±2.88% ±3.77%
path/parse-posix.js n=100000 path='/'                                                                                           *      1.60 %       ±1.35% ±1.80% ±2.36%
path/parse-posix.js n=100000 path='/foo'                                                                                      ***     -3.34 %       ±1.22% ±1.64% ±2.15%
path/parse-posix.js n=100000 path='/foo/bar.baz'                                                                                       1.02 %       ±1.54% ±2.05% ±2.68%
path/parse-posix.js n=100000 path='/foo/bar/baz/asdf/.quux'                                                                    **      3.21 %       ±2.19% ±2.91% ±3.79%
path/parse-posix.js n=100000 path='foo/.bar.baz'                                                                                *     -2.75 %       ±2.42% ±3.22% ±4.20%
path/parse-posix.js n=100000 path='foo/bar'                                                                                   ***     -2.99 %       ±1.02% ±1.36% ±1.77%
path/parse-win32.js n=100000 path=''                                                                                                   0.07 %       ±1.83% ±2.43% ±3.17%
path/parse-win32.js n=100000 path='\\\\foo'                                                                                     *      1.36 %       ±1.23% ±1.65% ±2.17%
path/parse-win32.js n=100000 path='\\\\foo\\\\bar\\\\baz\\\\asdf\\\\.quux'                                                            -0.06 %       ±1.54% ±2.04% ±2.66%
path/parse-win32.js n=100000 path='C:\\\\'                                                                                             1.26 %       ±1.60% ±2.14% ±2.82%
path/parse-win32.js n=100000 path='C:\\\\foo'                                                                                         -1.95 %       ±2.43% ±3.24% ±4.25%
path/parse-win32.js n=100000 path='E:\\\\foo\\\\bar.baz'                                                                               0.11 %       ±1.59% ±2.11% ±2.75%
path/parse-win32.js n=100000 path='foo\\\\.bar.baz'                                                                             *      2.16 %       ±2.14% ±2.88% ±3.81%
path/parse-win32.js n=100000 path='foo\\\\bar'                                                                                        -1.81 %       ±2.24% ±2.99% ±3.91%
path/relative-posix.js n=100000 paths='/|/'                                                                                           -0.49 %       ±1.70% ±2.27% ±2.97%
path/relative-posix.js n=100000 paths='/|/var'                                                                                         0.03 %       ±0.98% ±1.31% ±1.71%
path/relative-posix.js n=100000 paths='/data/orandea/test/aaa|/data/orandea/impl/bbb'                                                 -0.01 %       ±0.37% ±0.50% ±0.65%
path/relative-posix.js n=100000 paths='/foo/bar/baz/quux|/'                                                                   ***      1.44 %       ±0.46% ±0.62% ±0.80%
path/relative-posix.js n=100000 paths='/foo/bar/baz/quux|/foo/bar/baz/quux'                                                            3.13 %       ±4.87% ±6.49% ±8.47%
path/relative-posix.js n=100000 paths='/foo/bar/baz/quux|/var/log'                                                            ***      1.10 %       ±0.28% ±0.37% ±0.48%
path/relative-posix.js n=100000 paths='/var|/bin'                                                                             ***      1.85 %       ±0.48% ±0.64% ±0.83%
path/relative-win32.js n=100000 paths='C:\\\\|D:\\\\'                                                                                 -0.69 %       ±1.59% ±2.11% ±2.76%
path/relative-win32.js n=100000 paths='C:\\\\foo\\\\bar\\\\baz\\\\quux|C:\\\\'                                                        -0.44 %       ±0.78% ±1.04% ±1.36%
path/relative-win32.js n=100000 paths='C:\\\\foo\\\\bar\\\\baz|C:\\\\foo\\\\bar\\\\baz'                                                1.37 %       ±2.90% ±3.87% ±5.06%
path/relative-win32.js n=100000 paths='C:\\\\foo\\\\BAR\\\\BAZ|C:\\\\foo\\\\bar\\\\baz'                                        **     -0.59 %       ±0.39% ±0.52% ±0.68%
path/relative-win32.js n=100000 paths='c:\\\\İ\\\\a\\\\İ|c:\\\\İ\\\\b\\\\İ\\\\test.txt|..\\\\..\\\\b\\\\İ\\\\test.txt'         **      0.70 %       ±0.43% ±0.58% ±0.75%
path/relative-win32.js n=100000 paths='C:\\\\orandea\\\\test\\\\aaa|C:\\\\orandea\\\\impl\\\\bbb'                               *      0.66 %       ±0.56% ±0.74% ±0.97%
path/resolve-posix.js n=100000 paths=''                                                                                         *      1.04 %       ±1.04% ±1.38% ±1.80%
path/resolve-posix.js n=100000 paths='|'                                                                                               1.03 %       ±1.56% ±2.07% ±2.70%
path/resolve-posix.js n=100000 paths='a/b/c/|../../..'                                                                                 0.47 %       ±0.58% ±0.77% ±1.00%
path/resolve-posix.js n=100000 paths='foo/bar|/tmp/file/|..|a/../subfile'                                                     ***      3.85 %       ±0.95% ±1.26% ±1.64%
path/resolve-win32.js n=100000 paths=''                                                                                                0.27 %       ±1.18% ±1.57% ±2.04%
path/resolve-win32.js n=100000 paths='|'                                                                                               1.07 %       ±1.38% ±1.84% ±2.40%
path/resolve-win32.js n=100000 paths='c:/blah\\\\blah|d:/games|c:../a'                                                                -0.38 %       ±0.77% ±1.02% ±1.33%
path/resolve-win32.js n=100000 paths='c:/ignore|d:\\\\a/b\\\\c/d|\\\\e.exe'                                                            0.83 %       ±1.46% ±1.95% ±2.56%
path/toNamespacedPath-posix.js n=100000 path='.'                                                                                      -0.84 %       ±4.58% ±6.10% ±7.96%
path/toNamespacedPath-posix.js n=100000 path=''                                                                                        1.31 %       ±3.87% ±5.15% ±6.70%
path/toNamespacedPath-posix.js n=100000 path='/home/node/..'                                                                          -2.75 %       ±3.47% ±4.61% ±6.01%
path/toNamespacedPath-posix.js n=100000 path='/tmp/bar'                                                                               -1.33 %       ±3.71% ±4.93% ±6.42%
path/toNamespacedPath-posix.js n=100000 path='/w/bnch-comp/node/benchmark'                                                            -0.63 %       ±3.48% ±4.63% ±6.03%
path/toNamespacedPath-posix.js n=100000 path='bar/baz'                                                                                -2.64 %       ±3.93% ±5.22% ±6.80%
path/toNamespacedPath-win32.js n=100000 path=''                                                                                       -0.57 %       ±4.44% ±5.91% ±7.70%
path/toNamespacedPath-win32.js n=100000 path='\\\\e.exe'                                                                              -0.51 %       ±1.65% ±2.19% ±2.86%
path/toNamespacedPath-win32.js n=100000 path='\\\\w\\\\bnch-comp\\\\node\\\\benchmark'                                                -0.01 %       ±1.35% ±1.80% ±2.34%
path/toNamespacedPath-win32.js n=100000 path='c:../a'                                                                                 -0.41 %       ±0.90% ±1.20% ±1.57%
path/toNamespacedPath-win32.js n=100000 path='c:/blah\\\\blah'                                                                        -0.35 %       ±1.17% ±1.55% ±2.02%
path/toNamespacedPath-win32.js n=100000 path='c:/ignore'                                                                              -1.67 %       ±1.92% ±2.58% ±3.40%
path/toNamespacedPath-win32.js n=100000 path='d:/games'                                                                               -0.85 %       ±1.80% ±2.39% ±3.13%
path/toNamespacedPath-win32.js n=100000 path='d:\\\\a/b\\\\c/d'                                                                       -0.01 %       ±0.94% ±1.25% ±1.63%

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. path Issues and PRs related to the path subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants