title: Ways to handle window scroll
body: <p>Let's suppose I have N instances of some class.<br>
  Each instance has to do some calculations by window scroll.<br>
  There are two ways to do it:<br><br>
  1) Each instance has its own <code>scroll</code> handler:</p>
  
  <pre><code>var N = 100,
      i;
  
  var FirstWay = function() {
      this.doSomeCalculations = function() {
          // some calculations here
      };
  
      window.addEventListener( 'scroll', this.doSomeCalculations );
  };
  
  for ( i = 0; i &lt; N; i++ ) {
      new FirstWay();
  }
  </code></pre>
  
  <p>2) Single scroll handler which runs all instances:</p>
  
  <pre><code>var N = 100,
      i,
      instances = [];
  
  var SecondWay = function() {
      this.doSomeCalculations = function() {
          // some calculations here
      };
  };
  
  var doCommonCalculations = function() {
      var i;
  
      for ( i = 0; i &lt; N; i++ ) {
          instances[ i ].doSomeCalculations();
      }
  };
  
  for ( i = 0; i &lt; N; i++ ) {
      instances.push( new SecondWay() );
  }
  
  window.addEventListener( 'scroll', doCommonCalculations );
  </code></pre>
  
  <p>So, my question is which of this ways is better in terms of performance?</p>