reduction micro optimizations

Some small optimizations that don't affect code readability.
Improve performance by about 10% for reductions of sizes smaller O(100) elements.