reflow-in-circle

JavaScript performance comparison

Test case created by Egor

Preparation code

<div id="one"></div>
<div id="two"></div>
<script>
Benchmark.prototype.setup = function() {
    var one = document.getElementById('one'),
    two = document.getElementById('two'),
      width = 0;
};
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
mix
one.style.backgroundColor = 'red';
one.innerHTML = 'text';
width += one.clientWidth;
two.style.backgroundColor = 'red';
two.innerHTML = 'text';
width += two.clientWidth;
pending…
separate
one.style.backgroundColor = 'red';
one.innerHTML = 'text';
two.style.backgroundColor = 'red';
two.innerHTML = 'text';
width += one.clientWidth;
width += two.clientWidth;
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment