How to calculate simple moving average faster in C#?

后端 未结 14 2571
囚心锁ツ
囚心锁ツ 2020-12-15 06:42

What is the fastest library/algorithm for calculating simple moving average? I wrote my own, but it takes too long on 330 000 items decimal dataset.

  • period /
14条回答
  •  萌比男神i
    2020-12-15 06:52

    The current (accepted) solution contains an inner loop. It would be more efficient to remove this as well. You can see how this is achieved here:

    How to efficiently calculate a moving Standard Deviation

提交回复
热议问题