Badi interview question

Given a function will be called many times, how would you optimize that?