title: In Python, what is the faster way to calculate an EMA by reusing the previous calculations?
body: <p>I have been using TA-Lib to calculate EMAs but each time I add a new number to the array, TA-Lib performs the calculation from scratch again.</p>
  
  <p>I am doing analysis on a rather large set of data (> 1M rows) and this is quite slow.</p>
  
  <p>What would be the fastest way to calculate the new EMA when a new value is added?</p>