getComputedStyle Perf (v4)

Revision 4 of this benchmark created on


Preparation HTML

<div id="test" style="box-sizing:content-box;"></div>
<div id="test2" style="box-sizing:content-box;"></div>
<script>
var div = document.getElementById("test"),
 div2 = document.getElementById("test2"),
 gCS = window.getComputedStyle(div);

</script>

Test runner

Ready to run.

Testing in
TestOps/sec
gCS
gCS = window.getComputedStyle(div);
ready
style access then set
ready
gCS, access, then set to other
ready
just set
ready
access then set
ready

Revisions

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