optimize compile.