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
/
fixed-poolifier.mjs
diff --git
a/benchmarks/versus-external-pools/fixed-poolifier.mjs
b/benchmarks/versus-external-pools/fixed-poolifier.mjs
index aa922be8a9928651519572177eeb728cb9fe72b3..9a84e1e64a09293c0055d25b131fd30e7d323741 100644
(file)
--- a/
benchmarks/versus-external-pools/fixed-poolifier.mjs
+++ b/
benchmarks/versus-external-pools/fixed-poolifier.mjs
@@
-11,13
+11,16
@@
const data = {
const fixedPool = new FixedThreadPool(
size,
const fixedPool = new FixedThreadPool(
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
(fixedPool.execute(data))
+ promises.
add
(fixedPool.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