title: Performance looping, using this in which attribute or not
body: <p>i'm very interest in performance, and i would like to know how should i use in this case.</p>
  
  <p>This:</p>
  
  <pre><code>var Mapper;
  
  Mapper = function() {
    this.files = this.files;
    this.result = [];
    return this.each_file();
  };
  
  Mapper.prototype.each_file = function() {
    this.length = this.files.length;
    this.index = 0;
    while (this.index &lt; this.length) {
      this.result.push(this.get_info(this.file[this.index]));
      this.index++;
    }
    return this.result;
  };
  
  Mapper.prototype.get_info = function(file) {
    var info;
    return info = {
      name: file,
      exist: null,
      status: [],
      type: 'pdf'
    };
  };
  
  module.exports = Mapper;
  </code></pre>
  
  <p>Or this:
      var Mapper;</p>
  
  <pre><code>Mapper = function() {
    this.files = this.files;
    this.result = [];
    return this.each_file();
  };
  
  Mapper.prototype.each_file = function() {
    var index, length;
    length = this.files.length;
    index = 0;
    while (index &lt; length) {
      this.result.push(this.get_info(this.file[index]));
      index++;
    }
    return this.result;
  };
  
  Mapper.prototype.get_info = function(file) {
    var info;
    return info = {
      name: file,
      exist: null,
      status: [],
      type: 'pdf'
    };
  };
  
  module.exports = Mapper;
  </code></pre>
  
  <p>Explaining:</p>
  
  <p>I am doing a while looping to get information from files, in the first code, i'm using this in ALL properties, and in the second one i'm using this in just a few. I would like to know which one is the smarter, better for performance issues.</p>
  
  <p>OBS: I'm looping for more than 3.000 files.</p>