performance optimization for parser