csstext vs styles 5

Benchmark created by Anish on


Preparation HTML

<div id="myid">
    hi
</div>
<script>
  var test = document.getElementById('myid');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
cssText
test.style.cssText += ";font-size:10px; color:red; background-color:green;"
ready
Individual style
test.style.fontSize = "10px";
test.style.color = "red";
test.style.backgroundColor = "10px";
ready

Revisions

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