News for hackers. Stuff that matters.
Re:How much memory do you need in 2024 to run 1M concurrent ... by xarope on Friday November 29, 2024 @03:24AM (#42272050)
The argument then, is what if we DO load 2K worth [0] of randomized data into each of those 1m goroutines (and equivalents in the other languages), and do some actual processing. Would we still see the equivalent 10x (whatever math works it out to be) memory "bloat"? And what about performance?

We, as devs, have "4" such resources available to us, memory, network, I/O and compute. And it behooves us to not prematurely optimize on just one.

[0] I can see more arguments/discussions now, "2K is too low, it should be 2MB" etc...!

Re:How much memory do you need in 2024 to run 1M concurrent ... by masklinn on Friday November 29, 2024 @03:58AM (#42272309)
So the argument is “if you measure something completely different from and unrelated to the article you do not get the same result”?

I guess that’s true.

And to be clear, I do agree with the top comment (which seems to be by you), TFA uses timers in the other runtimes and go does have timers so using goroutines is unwarranted and unfair. And I said as much a few comment up (although I’d forgotten about AfterFunc so I’d have looped and waited on timer.After which would still have been a pessimisation).

And after thinking more about it the article is in also outright lying: technically it’s only measuring tasks in Go, timers are futures / awaitables but they’re not tasks: they’re not independently scheduled units of work, and are pretty much always special cased by runtimes.