parall threads (v2)

Revision 2 of this benchmark created by Calvin on


Description

parallel.js vs communist.js this is a 'unfair test' that uses both libraries idomatically, which will give a massive boost to communist.

Preparation HTML

<script src="https://rawgithub.com/adambom/parallel.js/master/lib/parallel.js"></script><script src="https://rawgithub.com/calvinmetcalf/communist/master/dist/communist.min.js"></script>
<script>
var square = function (n) { 
    return n * n;
};
var w = communist(square);
</script>

Setup

var a = Math.random()*100;

Test runner

Ready to run.

Testing in
TestOps/sec
communist
// async test
w.data(a).then(function(){deferred.resolve()});
ready
paralell
// async test
var p = new Parallel(a);
p.spawn(square).then(function(){deferred.resolve()});
ready

Revisions

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