function test() {
// some code here to optimize
}
%OptimizeFunctionOnNextCall(test);
test();
// ./d8 test.js --allow-natives-syntax --trace-turbo --trace-turbo-path turbo_out --trace-turbo-filter test
function test() {
// some code here to optimize
}
%PrepareFunctionForOptimization(test);
test();
%OptimizeFunctionOnNextCall(test);
test();
// ./d8 test.js --allow-natives-syntax --trace-turbo --trace-turbo-path turbo_out --trace-turbo-filter test
My question is what is the difference between using ‘%OptimizeFunctionOnNextCall()’ alone and using ‘%OptimizeFunctionOnNextCall()’ accompanied with ‘%PrepareFunctionForOptimization()’.
Thanks for your time taken to help me!
New contributor
Beginner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.