fastparallel
Advanced tools
Comparing version 2.0.0 to 2.0.1
27
bench.js
@@ -6,2 +6,4 @@ var max = 1000000 | ||
var async = require('async') | ||
var insync = require('insync') | ||
var items = require('items') | ||
var parallelize = require('parallelize') | ||
@@ -30,2 +32,10 @@ var obj = {} | ||
function benchInsyncParallel (done) { | ||
insync.parallel([somethingA, somethingA, somethingA], done) | ||
} | ||
function benchItemsParallel (done) { | ||
items.parallel.execute([somethingA, somethingA, somethingA], done) | ||
} | ||
function benchParallelize (done) { | ||
@@ -47,2 +57,14 @@ var next = parallelize(done) | ||
function benchInsyncEach (done) { | ||
insync.each([1, 2, 3], somethingP, done) | ||
} | ||
function benchInsyncMap (done) { | ||
insync.map([1, 2, 3], somethingP, done) | ||
} | ||
function benchItemsSerial (done) { | ||
items.serial([1, 2, 3], somethingP, done) | ||
} | ||
var nextDone | ||
@@ -79,2 +101,7 @@ var nextCount | ||
benchAsyncMap, | ||
benchInsyncParallel, | ||
benchInsyncEach, | ||
benchInsyncMap, | ||
benchItemsParallel, | ||
benchItemsSerial, | ||
benchParallelize, | ||
@@ -81,0 +108,0 @@ benchFastParallel, |
{ | ||
"name": "fastparallel", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Zero-overhead asynchronous parallel/each/map function call", | ||
@@ -33,2 +33,4 @@ "main": "parallel.js", | ||
"faucet": "0.0.1", | ||
"insync": "^2.1.0", | ||
"items": "^1.1.1", | ||
"parallelize": "^2.2.0", | ||
@@ -35,0 +37,0 @@ "pre-commit": "^1.0.6", |
@@ -8,14 +8,19 @@ # fastparallel [![Build Status](https://travis-ci.org/mcollina/fastparallel.svg?branch=master)](https://travis-ci.org/mcollina/fastparallel) | ||
* non-reusable `setImmediate`: 2453ms | ||
* `async.parallel`: 4269ms | ||
* `async.each`: 3286ms | ||
* `async.map`: 3822ms | ||
* `parallelize`: 3057ms | ||
* `fastparallel` with results: 2883ms | ||
* `fastparallel` without results: 2620ms | ||
* `fastparallel` map: 2839ms | ||
* `fastparallel` each: 2604ms | ||
* non-reusable `setImmediate`: 2085ms | ||
* `async.parallel`: 3784ms | ||
* `async.each`: 2959ms | ||
* `async.map`: 3656ms | ||
* `insync.parallel`: 12006ms | ||
* `insync.each`: 2698ms | ||
* `insync.map`: 11402ms | ||
* `items.parallel`: 4457ms | ||
* `items.serial`: 5130ms | ||
* `parallelize`: 6815ms | ||
* `fastparallel` with results: 2463ms | ||
* `fastparallel` without results: 2229ms | ||
* `fastparallel` map: 2456ms | ||
* `fastparallel` each: 2211ms | ||
These benchmarks where taken via `bench.js` on node v4.0.0, on a MacBook | ||
Pro Retina 2014. | ||
These benchmarks where taken via `bench.js` on node v4.1.0, on a MacBook | ||
Pro Retina Mid 2015. | ||
@@ -107,3 +112,3 @@ If you need zero-overhead series function call, check out | ||
1. This library is caching funcitons a lot. | ||
1. This library is caching functions a lot. | ||
@@ -110,0 +115,0 @@ 2. V8 optimizations: thanks to caching, the functions can be optimized by V8 (if they are optimizable, and I took great care of making them so). |
19404
538
122
9