News for hackers. Stuff that matters.
Re:Why Discord is switching from Go to Rust by robocat on Tuesday February 04, 2020 @06:13PM (#22242182)
However the memory usage difference is astonishing for some of those benchmarks - using 1000x more memory is only acceptable for some situations.
Re:Why Discord is switching from Go to Rust by iainmerrick on Wednesday February 05, 2020 @04:33AM (#22245327)
This may be overly cynical, but don’t you have it backwards? 1000x greater memory usage is acceptable for most applications.

There are only a few applications for which it isn’t acceptable.

Just look at all the massive apps built on Electron. People wouldn’t do that if it wasn’t effective.

Re:Why Discord is switching from Go to Rust by wool_gather on Wednesday February 05, 2020 @11:47AM (#22248534)
Wouldn't you say there's a difference between "effective" and "getting away with it"? If non-technical users see that their daily computing lives are made more complicated (because of lowered performance) by having n Electron apps running at the same time, they may not understand the reasons, but they will certainly choose a different solution that has the features they need, where available.
Re:Why Discord is switching from Go to Rust by iainmerrick on Wednesday February 05, 2020 @04:15PM (#22251055)
Wouldn't you say there's a difference between "effective" and "getting away with it"?

I used to think that but now I’m not so sure. :(

Re:Why Discord is switching from Go to Rust by igouy on Wednesday February 05, 2020 @12:34PM (#22249079)
— default JVM allocation ~35 MB looks astonishing for tiny programs that don't allocate memory

— memory usage is less different for tiny programs that do allocate memory: reverse-complement, k-nucleotide, binary-trees, mandelbrot, regex-redux

Re:Why Discord is switching from Go to Rust by squarefoot on Wednesday February 05, 2020 @02:00PM (#22249957)
Agreed, and ironically the most widely used Java platform (Android), despite its VM optimizations, is the one which would benefit the most from running only native code.

I mean, those 1GB RAM 7 years old slow as molasses phones getting dust into drawers or being littered into landfills would scream if they didn't have to run everything behind a VM.

Re:Why Discord is switching from Go to Rust by yc12340 on Wednesday February 05, 2020 @10:19PM (#22253170)
Make no mistake — Android isn't memory hungry because of Java alone. Android 4 used to comfortably fit in 1Gb of RAM, but Android 10 no longer can run on such devices. Both old and new versions use JVM, but newer Android has a lot of "helpful" system services, such as "Usage Statistics" service [1] and "Autofill Servide" [2].

Google's spyware is becoming more invasive and thus more memory-hungry.

1: https://developer.android.com/reference/android/app/usage/Us...

2: https://developer.android.com/reference/android/service/auto...