How to calculate sum on a row in AngularJS without triggering digest cycle?

I have an array of objects which are each represented by a row in a table. One of the object values is “amount”. So the array looks something like this:

var array = [{name: 'bob', amount: 10}, {name: 'james', amount: 12});

At the top of the table, I have a function calculate the sum of all the amounts and print it there. Unfortunately, it looks like this function is running every time some value is changing on the page even if it has nothing to do with that array. Is there any way to make the function called only when the array is updated?