Uh oh!
There was an error while loading. Please reload this page.
benchmark: Add remaining path benchmarks & optimize - #2103
Conversation
evanlucas
commented
Jul 5, 2015
Should we maybe force optimize like in https://github.com/nodejs/io.js/blob/master/benchmark/url/url-parse.js#L30? |
nwoltman
commented
Jul 5, 2015
That sounds like a good idea to me. |
There was a problem hiding this comment.
Why the call is made in all the cases before benchmark is started?
There was a problem hiding this comment.
This is because it takes V8 extra time to optimize the function when it is called after %OptimizeFunctionOnNextCall is called on it. So calling the function before the benchmark starts means that the time it takes for V8 to optimize the function does not get recorded as part of the benchmark time.
There was a problem hiding this comment.
Nice :-) Did you check if v8 is really going to optimize the function? If the function is never going to be optimized by v8, then we don't have to use this, right?
There was a problem hiding this comment.
Even if it doesn't now, that could change in the future, so it might be worth keeping it there anyway.
brendanashworth
commented
Jul 21, 2015
LGTM |
As a follow-up to 0d15161, this commit adds benchmarks for the rest of the path functions and also forces V8 to optimize the functions before starting the benchmark test.
brendanashworth
commented
Jul 27, 2015
landed in 99d9d7e, thanks! |
As a follow-up to 0d15161, this commit adds benchmarks for the rest of the path functions and also forces V8 to optimize the functions before starting the benchmark test (as suggested in a comment by @evanlucas).