joyent/node — pull request #3290 by FB55 (2012-05-20 19:34:20+00:00)
Title: Some small speed improvements (path.js)

* Use always `String#substr` as it's the [fastest of all substring methods](https://gist.github.com/320e6a4558e969048e7a#file_str_slice_vs_str_substr_vs_str_substring.js)
* Use `Array#filter` directly, don't call `Array#slice` before that (as it creates garbage & isn't required) ([benchmark](https://gist.github.com/320e6a4558e969048e7a#file_arr_slice_filter_vs_arr_filter.js))
* Use `RegExp#test` instead of `String#match` for getting booleans as it's [faster](https://gist.github.com/320e6a4558e969048e7a#file_re_test_vs_str_match.js) (& doesn't create an unused array)

And I added a tripple-equal instead of a double-equal, which is simply more consistent.