Improved grammar optimization performance.