Optimize compile phase