Worker-Threads not running in parallel #22207
Labels
needs investigation
requires further investigation before determining if it is an issue or not
perf
performance related
Version: Deno 1.40.2
I'm currently doing a benchmark of Node.js, Deno and Bun when using Worker Threads.
I have a very simple implementation, which creates a certain number of worker threads which calculate the fibonacci number.
This is the code i use for Deno
I did my benchmark with
/usr/bin/time -v deno run --allow-read main.js <num-threads>
and plotted it to a graph:
y: real time x: number of threads
y: user + sys time x: number of threads
y: Maximum resident size (memory) x: number of threads
So the real time and user+sys time is increasing linearly and the memory usage is just staying the same. This behavior seems weird to me. I would expect an increase in the memory usage and a similar graph to Node.js and Bun for real and user+sys time.
This led me to believe that there is some kind of bug in the worker threads API of Deno. However maybe the bug is in my code.
If you have any clue, please let me know.
Thanks!
The text was updated successfully, but these errors were encountered: