Commit b50e89e0 authored by Evan Lucas's avatar Evan Lucas
Browse files

path: improve posixSplitPath performance

Instead of slicing the first element off of the matches, shift and then
return. This improves performance of the following path functions:

- basename: 18-20%
- extname: 60-70%
- dirname: 18-20%
- parse: 20-25%

PR-URL: https://github.com/nodejs/node/pull/3034


Reviewed-By: default avatarBrian White <mscdex@mscdex.net>
Reviewed-By: default avatarSakthipriyan Vairamani <thechargingvolcano@gmail.com>
parent 1b78151f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment