New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastparallel

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastparallel - npm Package Compare versions

Comparing version 2.3.0 to 2.4.0

27

package.json
{
"name": "fastparallel",
"version": "2.3.0",
"version": "2.4.0",
"description": "Zero-overhead asynchronous parallel/each/map function call",

@@ -8,3 +8,4 @@ "main": "parallel.js",

"lint": "standard",
"test": "tape test.js | faucet"
"test": "tape test.js | faucet",
"coverage": "nyc --reporter=lcov tape test.js; cat coverage/lcov.info | coveralls"
},

@@ -31,17 +32,19 @@ "pre-commit": [

"devDependencies": {
"async": "^2.0.0-rc.5",
"async": "^3.1.0",
"coveralls": "^3.0.5",
"fastbench": "^1.0.1",
"faucet": "0.0.1",
"insync": "^2.1.0",
"items": "^2.1.0",
"neo-async": "^1.8.2",
"parallelize": "^3.0.0",
"pre-commit": "^1.1.3",
"standard": "^7.1.0",
"tape": "^4.5.0"
"insync": "^2.1.1",
"items": "^2.1.2",
"neo-async": "^2.6.1",
"nyc": "^14.1.1",
"parallelize": "^3.0.1",
"pre-commit": "^1.2.2",
"standard": "^13.0.1",
"tape": "^4.11.0"
},
"dependencies": {
"reusify": "^1.0.0",
"xtend": "^4.0.1"
"reusify": "^1.0.4",
"xtend": "^4.0.2"
}
}

@@ -8,21 +8,22 @@ # fastparallel [![Build Status](https://travis-ci.org/mcollina/fastparallel.svg?branch=master)](https://travis-ci.org/mcollina/fastparallel)

* non-reusable `setImmediate`: 1781ms
* `async.parallel`: 3484ms
* `async.each`: 2621ms
* `async.map`: 3054ms
* `neoAsync.parallel`: 2162ms
* `neoAsync.each`: 2156ms
* `neoAsync.map`: 2080ms
* `insync.parallel`: 10252ms
* `insync.each`: 2397ms
* `insync.map`: 9700ms
* `items.parallel`: 3725ms
* `parallelize`: 2928ms
* `fastparallel` with results: 2139ms
* `fastparallel` without results: 1957ms
* `fastparallel` map: 2102ms
* `fastparallel` each: 1941ms
```
benchSetImmediate*1000000: 1378.514ms
benchAsyncParallel*1000000: 1740.304ms
benchAsyncEach*1000000: 1566.517ms
benchAsyncMap*1000000: 1687.518ms
benchNeoParallel*1000000: 1388.223ms
benchNeoEach*1000000: 1473.006ms
benchNeoMap*1000000: 1402.986ms
benchInsyncParallel*1000000: 1957.863ms
benchInsyncEach*1000000: 1383.822ms
benchInsyncMap*1000000: 1822.954ms
benchItemsParallel*1000000: 1690.118ms
benchParallelize*1000000: 1570.064ms
benchFastParallel*1000000: 1536.692ms
benchFastParallelNoResults*1000000: 1363.145ms
benchFastParallelEachResults*1000000: 1508.134ms
benchFastParallelEach*1000000: 1325.314ms
```
These benchmarks where taken via `bench.js` on node v4.2.2, on a MacBook
Pro Retina Mid 2014 (i7, 16GB of RAM).
Obtained on node 12.18.2, on a dedicated server.

@@ -29,0 +30,0 @@ If you need zero-overhead series function call, check out

@@ -281,3 +281,2 @@ var test = require('tape')

var instance = parallel()
var count = 0
var obj = {}

@@ -290,6 +289,3 @@

t.equal(arg, 42)
setImmediate(function () {
count++
cb()
})
setImmediate(cb)
}

@@ -403,3 +399,2 @@ })

instance(obj, something, args, function done (err, results) {
console.log(results)
t.error(err)

@@ -429,1 +424,18 @@ t.deepEqual(results, [], 'empty results')

})
test('each works with arrays of objects', function (t) {
t.plan(3)
var instance = parallel({ results: false })
var obj = {}
var args = [{ val: true }, { val: true }]
instance(obj, something, args, function () {
t.ok('done called')
})
function something (arg, cb) {
t.ok(arg.val)
cb()
}
})

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc