Re:How much memory do you need in 2024 to run 1M concurrent ...
by ankit70 on Thursday November 28, 2024 @11:26PM
(#42270790)
NodeJS is better at memory than go?
[ Parent
| on HN ]
Re:How much memory do you need in 2024 to run 1M concurrent ...
by erik_seaberg on Thursday November 28, 2024 @11:33PM
(#42270823)
I'd expect that because Promises are small Javascript objects while goroutines each get a stack that grows from at least 2 KB.
Re:How much memory do you need in 2024 to run 1M concurrent ...
by dboreham on Thursday November 28, 2024 @11:47PM
(#42270897)
Otoh Go actually supports concurrency.
Re:How much memory do you need in 2024 to run 1M concurrent ...
by jpgvm on Thursday November 28, 2024 @11:52PM
(#42270921)
Well they are all concurrent. I think what you mean is Go is also parallel. As is C#, Rust and Java in this bench.
Re:How much memory do you need in 2024 to run 1M concurrent ...
by hu3 on Friday November 29, 2024 @02:19AM
(#42271657)
They are doing different things in this benchmark.
NodeJS has one thread with a very tight loop.
Go actually spawned 1M green threads.
Honestly this benchmark is just noise. Not to say useless in most real world scenarios. Specially because each operation is doing nothing. It would be somewhat useful if they were doing some operation like a DB or HTTP call.