It only optimizes what it considers "hot". If you have poorly optimized bytecode somewhere but it's not your bottleneck, it won't be a hot function and thus V8 won't waste time.
Hi Ujjwal,
The question was more about “how many function calls must be done in order to tell the engine, hey, optimize the function, pls”
And, we figured that it depends on the bytecode length. Does it sounds like true?)