Doc write versus DOM

Benchmark created on


Description

Testing wether document.write is faster than creating an element in the DOM for javascript.css

Test runner

Ready to run.

Testing in
TestOps/sec
document.write
document.write('<link rel="stylesheet" href="http://dl.dropbox.com/u/6951443/hosted-assets/css/reset.css" />');
ready
DOM
var jsCss = document.createElement('link');
jsCss.rel = 'stylesheet';
jsCss.href = 'http://dl.dropbox.com/u/6951443/hosted-assets/css/reset.css';
document.getElementsByTagName('head')[0].appendChild(jsCss);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.