wqfwewefewrw

JavaScript performance comparison

Revision 11 of this test case created

Preparation code

<script src="https://rawgithub.com/kriskowal/q/master/q.js"></script>

<script src="https://rawgithub.com/rkatic/p/master/p.js"></script>
<script src="https://rawgithub.com/dfilatov/jspromise/master/vow.min.js"></script>
<script src="https://rawgithub.com/artjock/pzero/master/pzero.js"></script>

    <script>
        define = function( factory ) {
            when = factory();
        };
        define.amd = {};
    </script>
<script src="https://rawgithub.com/cujojs/when/master/when.js"></script>
 
<script>
Benchmark.prototype.setup = function() {
    function addOne(x) {
        return x + 1;
    }
   
    Q.longStackJumpLimit = 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
Q
var d = Q.defer();
d.promise.then(addOne);
d.resolve(1);
pending…
when
var d = when.defer();
d.promise.then(addOne);
d.resolve(1);
pending…
P
var d = P.defer();
d.promise.then(addOne);
d.resolve(1);
pending…
Vow
var v = Vow.promise();
v.then(addOne);
v.fulfill(1);
pending…
pzero
var p = pzero();
p.then(addOne);
p.resolve(1);
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