Subject: Confirm Incentive Amnt - Id 354847

From: Landon Vega <[email-masked]>
Date: Fri, 20 Jun 2014 13:20:22 -0700

ATTN Ietf-dkim-archive:

Want to profit from using Solar Power?

Federal, state and local governments offer incredible financial incentives.
Confirm Gov Incentive Amount Here -> http://www.faststan.com/solar/gov/incentive.index

- Rooftop Solar can pay your Energy Bills-

-> Cut Bills by 70% from Day 1 <-

Enter Zip Here >> http://www.faststan.com/solar/gov/incentive.index

to stop further incentive updates - write Current Update Alerts
at 1644 Doral Dr / Brookings / SD / five seven zero seven six or http://www.faststan.com/k4/jged.4ikdkd

 comparing two registers means both of them should be set, but comparing with 0 needs one register. But since the difference is almost nothing and it is just in initialization of loop, I think using up count in many cases I remember programming assembly on the 6502 processor. The decrement version was faster back then. But that's ages ago... Shouldn't really make any (measurable) difference today.   Axel Oct 31 '12 at 13:54
 It all depends on the processor. In case of the decrement, there might be cases when the comparison  Completely irrelevant. In C, you might have a point. In JavaScript? None -- there's nowhere near that much of a 1:1 relationship between code and hardware in that language. (For instance, JavaScript doesn't have integers, so this is always going to be a floating point comparison in any case)   Billy ONeal Oct 31 '12 at  The benchmarks show the decrement version being consistently faster than the rest, across all browsers - My point was that while benchmarks may show that, the difference in real terms is insignificant and not worth worrying about. It's about as micro as micro-optimisations can get really. Also note that the benchmark I linked to falls into the trap mentioned in the highest voted answer here.   James e - it's never insignificant if you write real-time game or make real-time rendering. Imagine for a moment that you have 200 objects that you have to loop through every fr
 ame and that you have 50 frames/per seconds - then the loop will be executed 1000 times per second. Every gain seems good to me in this case.    Yes, and Javascript didn't even exist back then. But I referred to your comment "Something like comparing two registers and comparing a register against zero are going to run at the same rate.", which is not true for all processors.   Axel Nov 1 '12 at 8:27
What is worth mentioning is that we are talking about interpreted languages such as Ruby, Python. Compiled languages e.g. Java have optimizations on compiler level which which will "smooth" these differences to the point that it does not matter if .length is in declaration of for loop or not.   Haris Krajina Oct 30 '12 at Worth pointing out though that the backwards loop here is much faster in all versions of IE than the forward version. Since old IE is by far the slowest engine, if you can be happy with backwards iteration, use it.   According to this benchmark, IE had performance gains up to 30% faster. I'd say for large datasets, this is 
It's also worth mentioning that iterating backwards through a dynamic array can be useful if you intend to remove one or more elements during the loop.   Bok McDonagh Oct 30 '12 at 16:03
What about for(var i in myArray)?   melanke Oct 30 '12 at 19:28
JS engine has enough brain to figure out if body of a loop doesn't modify array, so it won't need to re-check length of the array. But that depends on the implementation of JavaScript engine. Going down to 0 uses only one variable, vs 2 in all other cases which is better for optimizer or JITs. Check below for my answer.   Pavel Oct 30 '12 at 19:40 
The evaluation of array.length will be eliminated by a good interpreter / compiler. The topic is the 'compare with 0' - see my answer below.   H.-Dirk Schmitt Oct 31 '12 at 10:03