|
|
|
|
|
by bascule
4480 days ago
|
|
Do you know what threads cost? Probably not. Linux has an O(1) scheduler. Threads do have a cost in terms of virtual memory, but on 64-bit architectures, this is a non-issue. Optimizing for "C10K" (which, btw, was a big number in 1999, not today) by using an event loop will actually harm latency and performance in the case that you are dealing with a small number of highly active connections. Believe it or not the kernel can do just as good (or better) a job of scheduling than Node's event loop. |
|