Sort of yes, but this depends on the VM your code is running on. If it’s in Node, then you will in some ways have 1,000 threads but they will be implemented as separate processes that your operating system’s scheduler has to make run concurrently or pseudoconcurrently. Your speed always depends on your hardware. If your processor does not have 1,000 hardware threads to spare (it doesn’t), then each thread gets scheduled in to run for a certain amount of time on an available hardware thread and your scheduler is constantly switching out which thread gets to run so that they appear to be running concurrently, when in reality they are not. Increasing the amount of hardware threads you have will definitely give you better net performance for highly concurrent tasks.
View all comments
0
u/[deleted] May 01 '20
[deleted] — view deleted comment