https://github.com/clayrisser/fastdash
multithreaded utility functions for node using worker threads
https://github.com/clayrisser/fastdash
async asynchronous fast map multithread multithreaded multithreading quick speedy thread threads worker worker-threads
Last synced: 4 months ago
JSON representation
multithreaded utility functions for node using worker threads
- Host: GitHub
- URL: https://github.com/clayrisser/fastdash
- Owner: clayrisser
- License: mit
- Created: 2019-03-25T07:53:39.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2023-07-12T10:49:52.000Z (over 2 years ago)
- Last Synced: 2025-03-29T19:08:27.328Z (11 months ago)
- Topics: async, asynchronous, fast, map, multithread, multithreaded, multithreading, quick, speedy, thread, threads, worker, worker-threads
- Language: TypeScript
- Homepage: https://codejam.ninja
- Size: 674 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# fastdash

[](https://github.com/codejamninja/fastdash)
> multithreaded utility functions for node using worker threads
Please ★ this repo if you found it useful ★ ★ ★
## Features
* supports typescript
* customize max threads
## Benchmarks
### map benchmarks
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.
## Installation
```sh
npm install --save fastdash
```
## Dependencies
* [NodeJS](https://nodejs.org)
## Usage
Iteratee callback functions must be pure functions
### map
```js
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();
```
## Support
Submit an [issue](https://github.com/codejamninja/fastdash/issues/new)
## Screenshots
[Contribute](https://github.com/codejamninja/fastdash/blob/master/CONTRIBUTING.md) a screenshot
## Contributing
Review the [guidelines for contributing](https://github.com/codejamninja/fastdash/blob/master/CONTRIBUTING.md)
## License
[MIT License](https://github.com/codejamninja/fastdash/blob/master/LICENSE)
[Jam Risser](https://codejam.ninja) © 2019
## Changelog
Review the [changelog](https://github.com/codejamninja/fastdash/blob/master/CHANGELOG.md)
## Credits
* [Jam Risser](https://codejam.ninja) - Author
## Support on Liberapay
A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.
[Add some fuel](https://liberapay.com/codejamninja/donate) if you'd like to keep me going!
[](https://liberapay.com/codejamninja/donate)
[](https://liberapay.com/codejamninja/donate)