News for hackers. Stuff that matters.
Re:Javascript and CSS best practices for better performance by mayoff on Tuesday June 15, 2010 @03:16PM (#1433575)
Some of the advice is just plain wrong depending on your target platform. For example, on my iPad, iPhone 3G (not 3GS), and Safari 5.0 (6533.16)/Mac, using createElement/appendChild is consistently faster than using innerHTML. In Chrome 5.0.375.70/Mac, they are the same speed. In Firefox 3.6.3/Mac, naive createElement is slower, but using a DocumentFragment makes it as fast as innerHTML.

My test case: http://dqd.com/~mayoff/timeDom.html

There are no comments on this comment yet.