3 ms·
Wormholes in JavaScript
- kderbyma 8y agoThis makes me think of the Array While hack to transverse faster. Rather than using a for loop, do the following: Var i = -1; Var len = array.length. While(++I < Len) { ...} Uses the fact that CPUs branch predict forward in arrays, and runs faster through the arrays that a for loop which can actually run out of sequence as well.