一个与 C++ STL 进行基准测试的 JavaScript 标准数据结构库。
A javascript standard data structure library which benchmark against C++ STL
English | 简体中文
length.unshift or getting elements by index.We are benchmarking against other popular data structure libraries. In some ways we're better than the best library. See Benchmark.
|
IE / Edge |
Firefox |
Chrome |
Safari |
Opera | 
NodeJs | |:----------------------------:|:-----------------------------:|:---------------------------:|:---------------------------:|:-------------------------:|:---------------------------:| | Edge 12 | 36 | 49 | 10 | 36 | 10 |
Download directly by cdn:
Or install js-sdsl using npm:
npm install js-sdslOr you can download the isolation packages containing only the containers you want:
| package | npm | size | docs |
|---|---|---|---|
| @js-sdsl/stack | link | ||
| @js-sdsl/queue | link | ||
| @js-sdsl/priority-queue | link | ||
| @js-sdsl/vector | link | ||
| @js-sdsl/link-list | link | ||
| @js-sdsl/deque | link | ||
| @js-sdsl/ordered-set | link | ||
| @js-sdsl/ordered-map | link | ||
| @js-sdsl/hash-set | link | ||
| @js-sdsl/hash-map | [ |
[link][hash-map-docs] |
You can visit our official website to get more information.
To help you use the library more effectively, we also provide this API document.
For previous versions of the documentation, please visit:
https://js-sdsl.org/js-sdsl/previous/v${version}/index.html
E.g.
https://js-sdsl.org/js-sdsl/previous/v4.1.5/index.html
// esModule
import { OrderedMap } from 'js-sdsl';
// commonJs
const { OrderedMap } = require('js-sdsl');
const myOrderedMap = new OrderedMap();
myOrderedMap.setElement(1, 2);
console.log(myOrderedMap.getElementByKey(1)); // 2We use Karma and Mocha to run unit tests and synchronize coverage to Coveralls. You can run yarn test:unit command to reproduce it.
We benchmark most functions for performance. You can go to gh-pages/performance.md to see our running results or reproduce it with yarn test:performance command.
You can also visit here to get the result.
Use Gitpod, a free online dev environment for GitHub. Or clone locally:
$ git clone https://github.com/js-sdsl/js-sdsl.git
$ cd js-sdsl
$ npm install
$ npm run dev # development modeThen you can see the output in dist/cjs folder.
Feel free to dive in! Open an issue or submit PRs. It may be helpful to read the Contributor Guide.
Thanks goes to these wonderful people: This project follows the all-contributors specification. Contributions of any kind welcome!
The special thanks to these sponsors or backers because they provided support at a very early stage:
Thanks also give to these sponsors or backers:
[hash-map-umd-link]:
暂无开放 Issues,或尚未同步最近议题。