Echo JS 0.11.0

<~>

gotofritz 3867 days ago. link 3 points
linkbait. the only optimization technique they give is


    // Slow cycle
    for(var i=0; i<items.length; i++) {
    // code is here...
    }
    // this one is faster
    var size = items.length;
    for(var i=0;i<size; i++){
    // code is here...
    }
xedcsm 3866 days ago. link 2 points
and that optimization isn't even a factor in v8 anymore because it caches `items.length`. Not sure about other engines.

The latter example could still be rewritten as:

for (var i=0,len=items.length; i<len; i++){
  // code is here...
}