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

lib: micro-optimize url.resolve() #184

Merged
merged 2 commits into from
Dec 20, 2014

Commits on Dec 20, 2014

  1. benchmark: rename url.parse() benchmark

    Rename the url.parse() benchmark from url.js to url-parse.js.
    A follow-up commit is going to add another one for url.resolve().
    
    PR-URL: nodejs#184
    Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
    bnoordhuis committed Dec 20, 2014
    Configuration menu
    Copy the full SHA
    6b2af5f View commit details
    Browse the repository at this point in the history
  2. lib: micro-optimize url.resolve()

    Replace the call to Array#splice() with a faster open-coded version
    that creates less garbage.
    
    Add a new benchmark to prove it.  With the change applied, it scores
    about 5% higher and that is nothing to sneeze at.
    
    PR-URL: nodejs#184
    Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
    bnoordhuis committed Dec 20, 2014
    Configuration menu
    Copy the full SHA
    aff56cd View commit details
    Browse the repository at this point in the history