Some

  • Revision slug: Talk:JavaScript/Reference/Global_Objects/Array/Some
  • Revision title: Some
  • Revision id: 138055
  • Created:
  • Creator: Jake Archibald
  • Is current revision? Yes
  • Comment page created, 54 words added

Revision Content

Jake Archibald: I removed "var len = this.length >>> 0" from the implementation of some(), it doesn't appear to be of any benefit outside of Spidermonkey. If casting to native is required, "this.length-0" would be faster in JS unless I'm mistaken (but I understand that bit shifting is faster in C).

Revision Source

<p>Jake Archibald: I removed "var len = this.length &gt;&gt;&gt; 0" from the implementation of some(), it doesn't appear to be of any benefit outside of Spidermonkey. If casting to native is required, "this.length-0" would be faster in JS unless I'm mistaken (but I understand that bit shifting is faster in C).</p>
Revert to this revision