3 ms·
NodeJS is better at memory than go?
by ankit70 2y ago
NodeJS is better at memory than go?
- erik_seaberg 2y agoI'd expect that because Promises are small Javascript objects while goroutines each get a stack that grows from at least 2 KB.
- hu3 2y agoThey 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.