I am doing some accounting but then wonder if there is a better way to replace for loop (CPU intensive) for long list of items.
Suppose we have a transaction record l