The algorithm used by Mean PtByPt and numerous other PtByPt VI's implements an internal array buffer using the "Rotate Array" function in updating the buffer with a new element.
An alternative implementation would be to simply increment and keep track of an index pointer in the array to locate the position where the next new element will be inserted.
Presumably, the Rotate Array function causes the entire array to be read from and then re-written to memory. The attached VI illustrates that this can result in a significant impact on the algorithm efficiency.
The implementation involving the Rotate Array function results in an efficiency which is sensitive to the array siz
e (especially for large arrays), while the index tracking method runs in the same time independent of the array size. Even with small array sizes, the Rotate Array option seems about 1/3 less efficient.
I have written (originally Labview 5.0) a fairly comprehensive real-time control application which sometimes gets used at update rates of 100 Hz and higher. I am disappointed that these PtByPt algorithms do not seem to be written efficiently, and I would probably avoid using them in updated versions of my application...
There also seems to be the potential for numerical instability (for example in the Mean PtByPt.vi) when these routines are used continuously at reasonably high update rates over long periods of time... (For example, in the Mean PtByPt.vi, the Infinite Horizon case I32 count index will saturate after 124 days at 200 Hz update. Also, is the Double Precision "Total" numerically stable for either case after a large number of updates??)