Test Both Strings and DOM

Test Both Strings and DOM

Browsers Targeted: Internet Explorer 3+

It used to be a truism that manipulating strings was always much slower in DHTML than working directly with the Document Object Model (DOM), but with newer versions of the browser that may no longer be the case. The Internet Explorer 5.0 string manipulation capability is incredibly fast?when building a table of a thousand rows, for example, it took between twenty and thirty seconds to create when working with the DOM, but barely three seconds when a string buffer was created that contained the text HTML. For older versions of the browser the opposite was generally true; string buffering was much slower. So if you can determine your target platform may want to include both ways of building tables. (Note that string manipulation is almost certainly a beneficiary of research done with XSL).

Time Taken=0s
Math Table


Share the Post: