Domanda di colloquio di Badi

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