Commit 1a63b45a authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

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: https://github.com/iojs/io.js/pull/132


Reviewed-By: default avatarChris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: default avatarFedor Indutny <fedor@indutny.com>
parent c4a308d2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment