title: Advice for efficient stream sliding window processing
body: <p>At each time t (every 10ms) I receive a set of ints </p>
  
  <pre><code>{i_{0,t}, i_{1,t}, i_{2,t}}_t 
  </code></pre>
  
  <p>which goes into separate buffers:</p>
  
  <pre><code>seq_0 = [...,i_{0,t-2},i_{0,t-1},i_{0,t},...], seq_1 and seq_2
  </code></pre>
  
  <p>I need to make real-time computations on the sequences for a set of sliding window of different sizes. For example: for a sliding window of size <code>3</code>, I will compute function <code>f()</code> on samples received at time <code>t</code>, <code>t-1</code>, <code>t-2</code> in each buffered sequences.</p>
  
  <pre><code>at time t for seq_0 I compute f([i_{0,t-2},i_{0,t-1},i_{0,t}])
  </code></pre>
  
  <p>I would like some advice for data structure (c++) to use or code design.
  In practice I would like 4 different sizes of sliding window.</p>
  
  <p>Thanks in advance.</p>