Skip to content

practicing node_js worker_threads to offload the main thread to do cpu intensive tasks, interesting way to use the systems threads.

Notifications You must be signed in to change notification settings

IMRANDIL/nodejs_worker_threads_practice

Repository files navigation

Benchmarking the performance

result below from index.js and worker.js

<!-- time curl --get http://localhost:8000/blocking

This is blocking one result: 20000000000

real 0m18.071s

user 0m0.000s

sys 0m0.000s -->

result below from four_index.js and four-worker.js

<!-- $ time curl --get http://localhost:8000/blocking

This is blocking one result: 20000000000

real 0m4.327s

user 0m0.000s

sys 0m0.000s -->

The comparison is sheer clear above.

About

practicing node_js worker_threads to offload the main thread to do cpu intensive tasks, interesting way to use the systems threads.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published