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

benchmark: pre-optimize url.parse() before start #132

Merged
merged 1 commit into from
Dec 19, 2014

Commits on Dec 19, 2014

  1. benchmark: pre-optimize url.parse() before start

    Force V8 to optimize url.parse() before starting the actual benchmark.
    Tries to minimize variance between successive runs caused by the
    optimizer kicking in at different points.
    
    It does not seem to have much impact, CPU times are roughly the same
    before and afterwards; url.parse() quickly plateaus at a local optimum
    where most time is spent in V8 builtins, notably Runtime_StringSplit()
    and Object::GetElementWithReceiver() calls originating from
    deps/v8/src/uri.js, with no recurring optimize/deoptimize cycles that
    I could spot.
    
    Still, I don't see any downsides to pre-optimizing the function being
    benchmarked so in it goes.
    
    PR-URL: nodejs#132
    Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
    Reviewed-By: Fedor Indutny <fedor@indutny.com>
    bnoordhuis committed Dec 19, 2014
    Configuration menu
    Copy the full SHA
    1a63b45 View commit details
    Browse the repository at this point in the history