Add small performance optimizations.