The need for speed: innerHTML versus DOM manipulation

A

Andrew Hedges

Hi again, Jim,

On this page (the one to which I linked in the article and above):

http://andrew.hedges.name/experiments/innerhtml/

....I do, in fact, list the type of computer, processor, etc.: "I ran
the two methods outlined below on my Apple MacBook (2.0GHz Core 2 duo
processor, 2GB of RAM) in several browsers. I ran each test on each
browser 5 times set to loop 1000 times." The web server and network
speeds are irrelevant since the processing is all done client-side.

On that page, I also list the most relevant parts of the code, but
being client-side, all the code is there for the viewing (including
the functions that do the timing). That page allows you to run the
test yourself and encourages you to comment with your own results.

In any case, I appreciate the thoughtfulness of your comments.

Cheers,
-Andrew
 
T

The Natural Philosopher

Andrew said:
Hi again, Jim,

On this page (the one to which I linked in the article and above):

http://andrew.hedges.name/experiments/innerhtml/

...I do, in fact, list the type of computer, processor, etc.: "I ran
the two methods outlined below on my Apple MacBook (2.0GHz Core 2 duo
processor, 2GB of RAM) in several browsers. I ran each test on each
browser 5 times set to loop 1000 times." The web server and network
speeds are irrelevant since the processing is all done client-side.

On that page, I also list the most relevant parts of the code, but
being client-side, all the code is there for the viewing (including
the functions that do the timing). That page allows you to run the
test yourself and encourages you to comment with your own results.

In any case, I appreciate the thoughtfulness of your comments.

Cheers,
-Andrew
Well I ran the tests on my PC - 433 celeron, Win98, and got identical
speeds for firefox, but the older IE6 was twice as fast on inner HTML as
DOM whatever that means ;-)

It wouldn't let me post results tho.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top