Merge branch 'master' of github.com:poolifier/poolifier into feature/task-functions
[poolifier.git] / benchmarks / README.md
1 # Poolifier Benchmarks
2
3 Welcome to poolifier benchmarks and thanks to look into this project.
4
5 ## Folder Structure
6
7 The [internal](./internal) folder contains poolifier internal benchmark.
8 The [versus-external-pools](./versus-external-pools) folder contains benchmark versus other Node.js pools.
9
10 ## Poolifier vs other pools benchmark
11
12 To compare poolifier pools performance vs other pools performance we chose to use [hyperfine](https://github.com/sharkdp/hyperfine).
13 We chose to use this tool because it allows to run isolated Node.js processes so each pool does not impact each other.
14
15 - External pools with which we compare the poolifier results:
16
17 - [piscina](https://github.com/piscinajs/piscina)
18 - [tinypool](https://github.com/tinylibs/tinypool)
19 - [workerpool](https://github.com/josdejong/workerpool)
20 - [worker-nodes](https://github.com/allegro/node-worker-nodes)
21 - [node-worker-threads-pool](https://github.com/SUCHMOKUO/node-worker-threads-pool)
22 - [nanothreads](https://github.com/snuffyDev/nanothreads)
23
24 Those are our results:
25
26 - CPU Intensive task with 100k operations submitted to each pool: [BENCH-100000.md](./versus-external-pools/BENCH-100000.md).
27
28 - External pools with which we used to compare the poolifier results:
29
30 <!-- - [node-worker-threads-pool](https://github.com/SUCHMOKUO/node-worker-threads-pool): removed because it does not support dynamic modules import or import outside the task function. The task function is expected to be self-contained, which makes it difficult to use in real world application without ugly hacks. -->
31
32 - [worker-threads-pool](https://github.com/watson/worker-threads-pool): removed because unmaintained since more than 4 years.
33 - [threadwork](https://github.com/kevlened/threadwork): removed because unmaintained since more than 3 years.
34 - [microjob](https://github.com/wilk/microjob): removed because unmaintained since more than 5 years.
35 - [threads.js](https://github.com/andywer/threads.js/): removed because not a threads pool.
36
37 > :warning: **We would need funds to run our benchmark more often and on Cloud VMs, please consider to sponsor this project**
38
39 Read the [README.md](./versus-external-pools/README.md) to know how to run the benchmark.
40
41 ## Poolifier internal benchmark
42
43 ### Usage
44
45 To run the internal benchmark, you just need to navigate to the root of poolifier project and run `pnpm benchmark`.
46
47 ### [Results](https://poolifier.github.io/benchmark-results/dev/bench)