title: Very fast endless loop without blocking I/O
body: <p>Is there a faster alternative to <code>window.requestAnimationFrame()</code> for endless loops that don't block I/O?</p>
  
  <p>What I'm doing in the loop isn't related to animation so I don't care when the next frame is ready, and I have read that <code>window.requestAnimationFrame()</code> is capped by the monitor's refresh rate or at least waits until a frame can be drawn.</p>
  
  <p>I have tried the following as well:</p>
  
  <pre><code>function myLoop() {
      // stuff in loop
      setTimeout(myLoop, 4);
  }
  </code></pre>
  
  <p>(The 4 is because that is the minimum interval in <code>setTimeout</code> and smaller values will still default to 4.) However, I need better resolution than this.</p>
  
  <p>Is there anything with even better performance out there?</p>
  
  <p>I basically need a non-blocking version of <code>while(true)</code>.</p>