multithreaded utility functions for node using worker threads
Please ★ this repo if you found it useful ★ ★ ★
- supports typescript
- customize max threads
These benchmarks were performed on a server with 8 cores to show the contrast between multithreaded and single threaded node processing.
A function calculates prime numbers to simulate a workload.
map() |
CPU Intensive | CPU Nonintensive |
|---|---|---|
| fastdash | 2741.328177 ms | 322.372878 ms |
| lodash | 10367.716365 ms | 0.271168 ms |
fastdash is multithreaded and is faster than lodash for CPU intensive tasks.
lodash is single threaded and is slower than fastdash for CPU intensive tasks.
lodash is faster than fastdash for tasks that are not CPU intensive.
npm install --save fastdashIteratee callback functions must be pure functions
import fast from 'fastdash';
async main() {
const result = await fast.map([1, 2, 3], item => {
return item + 1;
});
console.log(result); // [2, 3, 4]
}
main();Submit an issue
Contribute a screenshot
Review the guidelines for contributing
Jam Risser © 2019
Review the changelog
- Jam Risser - Author
A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.
Add some fuel if you'd like to keep me going!


