tp-reflow

JavaScript performance comparison

Test case created

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,
        text;
};
</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
Mixed
text = Math.random();

one.innerHTML = text;
width += one.clientWidth;

two.innerHTML = text;
width += two.clientWidth;
pending…
Grouped
text = Math.random();

one.innerHTML = text;
two.innerHTML = text;

width += one.clientWidth;
width += two.clientWidth;
pending…

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

Compare results of other browsers

0 comments

Add a comment