Node.js library for multi-threaded sorting of large number arrays.
Most useful when doing frequent sorts of arrays larger than 10 million elements.
NB: This library only works in Node.js, and not in the browser, as it depends on the Node.js worker threads API.
Install with npm install parallel-sort. Then use it in your project:
import parallelSort from 'parallel-sort';
const myBigArrayThatNeedsSorting = Float64Array.from({length: 10_000_000}, () => Math.random());
const mySortedArray = await parallelSort(myBigArrayThatNeedsSorting);Pull requests are welcomed on GitHub! To get started:
- Install Git and Node.js
- Clone the repository
- Install dependencies with
npm install - Run
npm run testto run tests - Build with
npm run build
Versions follow the semantic versioning spec.
To release:
- Use
npm version <major | minor | patch>to bump the version - Run
git push --follow-tagsto push with tags - Wait for GitHub Actions to publish to the NPM registry.