Improve performance for compiler