Why is co-parallel better than simply yielding an array within co? I can't find any documentation about that, and my tests don't show any particular advantage:
// tasks is an array of 200 async tasks simulated by setTimeout, cf #3
var start = Date.now();
yield parallel(tasks, 10);
console.log('total used %dms', Date.now() - start);
This takes 170ms on average, while:
// tasks is an array of 200 async tasks simulated by setTimeout, cf #3
var start = Date.now();
yield tasks;
console.log('total used %dms', Date.now() - start);
This takes 117ms on average
Why is co-parallel better than simply yielding an array within co? I can't find any documentation about that, and my tests don't show any particular advantage:
This takes 170ms on average, while:
This takes 117ms on average