Terarecon interview question

How will you optimize the code sample you provided?