repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): bump typescript
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
dynamic-poolifier.mjs
diff --git
a/benchmarks/versus-external-pools/dynamic-poolifier.mjs
b/benchmarks/versus-external-pools/dynamic-poolifier.mjs
index 48d3028fb1a1cbd399f608b6d9e956abce3399e0..ce605eccb51fe54c6d767d683c432e5226519c39 100644
(file)
--- a/
benchmarks/versus-external-pools/dynamic-poolifier.mjs
+++ b/
benchmarks/versus-external-pools/dynamic-poolifier.mjs
@@
-12,13
+12,16
@@
const data = {
const dynamicPool = new DynamicThreadPool(
Math.floor(size / 2),
size,
const dynamicPool = new DynamicThreadPool(
Math.floor(size / 2),
size,
- './workers/poolifier/function-to-bench-worker.mjs'
+ './workers/poolifier/function-to-bench-worker.mjs',
+ {
+ enableTasksQueue: false
+ }
)
async function run () {
)
async function run () {
- const promises =
[]
+ const promises =
new Set()
for (let i = 0; i < iterations; i++) {
for (let i = 0; i < iterations; i++) {
- promises.
push
(dynamicPool.execute(data))
+ promises.
add
(dynamicPool.execute(data))
}
await Promise.all(promises)
// eslint-disable-next-line n/no-process-exit
}
await Promise.all(promises)
// eslint-disable-next-line n/no-process-exit