News for hackers. Stuff that matters.
Re:How to write up to 98% faster JavaScript code. by fleitz on Friday April 15, 2011 @06:15PM (#2452439)
The problem is that the code is not semantically identical, there is no way for the compiler to know that nothing else has changed while the loop is executing. It's like the frequent optimization case of

  int len = array.length
  for(i = 0; i < len; i++){

  } 
vs.

  for(i = 0; i < array.length; i++){
  
  }
The code is semantically different and therefore has a different performance profile.

There are no comments on this comment yet.