Kde nás najdete

JavaScript performance comparison

Test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    function Circle(name)
    {
    this.name = name;
    }
    Circle.MAX_SPEED = 100;
    Circle.prototype.MIN_SPEED = 10;
};
</script>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
test1
c = new Circle('circle1');
d = new Circle('circle2');
d.MAX_SPEED += 2;
d.MIN_SPEED = 20;
document.write(Circle.MAX_SPEED+"<br>");
document.write(c.name);
document.write(c.MAX_SPEED+"<br>");
document.write(c.MIN_SPEED+"<br>");
document.write(d.name+"<br>");
document.write(d.MAX_SPEED+"<br>");
document.write(d.MIN_SPEED+"<br>");
pending…
test2
c = new Circle('circle1');
d = new Circle('circle2');
d.MAX_SPEED = 2;
d.MIN_SPEED = 20;
document.write(Circle.MAX_SPEED+"<br>");
document.write(c.name);
document.write(c.MAX_SPEED+"<br>");
document.write(c.MIN_SPEED+"<br>");
document.write(d.name+"<br>");
document.write(d.MAX_SPEED+"<br>");
document.write(d.MIN_SPEED+"<br>");
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