Browse Source

path: performance improvements on all platforms

This commit significantly improves performance of all path functions.

Optimization strategies include:
* Replacing regexps with manual parsers
* Avoiding unnecessary array creation (including split() + join())
* Returning earlier where possible to avoid unnecessary work
* Minimize unnecessary string creation and concatenations
* Combining string iterations

PR-URL: https://github.com/nodejs/node/pull/5123
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
process-exit-stdio-flushing
Brian White 9 years ago
committed by James M Snell
parent
commit
b212be08f6
  1. 1929
      lib/path.js

1929
lib/path.js

File diff suppressed because it is too large
Loading…
Cancel
Save