I'm using a 5-point Triangle Moving Average:
$$S_j = (Y_{j-2} + 2Y_{j-1} + 3Y_j + 2Y_{j+1} + Y_{j+2}) / 9$$
The problem is that I often need to smooth my data more than once, and when I do this too much, it becomes noticeability very slow (and I'm using C++).
Is there a way to optimize this formula?
Like maybe skipping every other data point and then using interpolation in the end, or something clever?
Thanks