reduce iterations for adding values in tight loop