Tight loop optimizations