Perform some micro-optimizations.