Optimizing out a few immutable calls in inner loops