| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
LGTM |
Sorry, something went wrong.
Sorry, something went wrong.
|
meh, test-stringbytes-external on arm failed...as well as test-child-process-emfile on freebsd. I haven't seen that one fail before. Is that one known to be flaky at all? |
Sorry, something went wrong.
|
@evanlucas They both are flaky, so don't worry about it :-) |
Sorry, something went wrong.
There was a problem hiding this comment.
If there is no match, then matches will be null.
Sorry, something went wrong.
There was a problem hiding this comment.
That would have been the case before too, though. I'm not sure if it's possible to get no match with the regexp that's currently being used ...
Sorry, something went wrong.
|
Just curious - why not Array.shift() and return? |
Sorry, something went wrong.
|
@alexlamsl Nice catch. I swear I had tried that before and it was a tiny bit slower than manually doing it, but that is not correct. It looks like shift is a little faster. Thanks! |
Sorry, something went wrong.
Sorry, something went wrong.
|
CI looks happy (minus test-stringbytes-external.js). Will plan to land tomorrow if no one has any objections. |
Sorry, something went wrong.
|
I still have my doubts about null, otherwise LGTM. |
Sorry, something went wrong.
|
@thefourtheye let me see if I can convince you... 1 2 3.1 3.2 4
/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/
Part 1 (\/?|) - can be empty So this pattern will always match. |
Sorry, something went wrong.
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: nodejs#3034 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
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: #3034 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
| Back | FazBrowse Home | New Git URL |
Instead of slicing the first element off of the matches, manually build
the array. This improves performance of the following path.posix functions: