Yep. There is an important lesson here, which applies in any large enterprise or web scale system. The fastest algorithms are going to be mathematical in nature. Pretty much any problem which has a converging solution has an analytical, non-summing solution like this. Better still, it scales and the complexity stays the same.
If you liked that, you might enjoy this.