If you choose your second method you're doing the calculation twice. i.e. iterating through each product instead of just once. It approximately doubles the computation time.
Personally I prefer the first. I'd just add a comment or two on the methods being used.