October 25, 2005

Like An Elephant In Your Backyard

There really is a lot of rublish information out there on the Internet, presented by so called "experts". While researching javascript performance tuning for a current project, I came across these charming nuggets:

Iterating loops backwards (decrementing) is faster than incrementing, and when looping though DOM objects by tagname, it's faster to include the getElementsByTagName is the for loop evaluation statement. I wonder how many people blindly accept this stuff?

Profiling the above coding suggestions in gecko (Firefox) and trident (Internet Explorer 6), showed that in all cases the suggestions resulted in speeds that were either the same or slower. In fact, the getElementsByTagName suggestion under Internet Explorer 6 increased the execution time by 250%, not exactly a performance increase! lol.

Posted by Matt at October 25, 2005 3:58 PM

Fraggle Chitter Chatter

Have Your Say

Remember me?



 (not displayed on site)