Reduce HashMap allocations.