News for hackers. Stuff that matters.
Re:Why we chose Rust by eridius on Thursday June 20, 2019 @07:08PM (#20238334)
It was a SoC device that had a real-time latency requirement. I'm actually surprised they even bothered putting Java in the table.
Re:Why we chose Rust by Matthias247 on Thursday June 20, 2019 @11:22PM (#20239625)
Real-time is a huge field. There is hard-realtime with < 1ms deadlines. And there is soft realtime which is often "fast enough that the user doesn't complain", which is maybe somewhere between 100ms and 1s for various applications. For a cloud-connected device I assume it's in the latter category since most transport protocols won't provide much better guarantees anyway. For those use-cases most languages will be fine.
Re:Why we chose Rust by incompatible on Thursday June 20, 2019 @07:11PM (#20238354)
Or Python for that matter. It's the sort of use case where it's worth considering a language without a garbage collector.
Re:Why we chose Rust by mattashii on Thursday June 20, 2019 @07:24PM (#20238468)
> Or python for that matter

Both Java and Python have (limited) implementations for time-sensitive microcontrollers: Chances are high your SIM card or your chipcard is running Java, and I believe Python (MicroPython) is also in active use on some SOCs

Re:Why we chose Rust by eridius on Thursday June 20, 2019 @07:15PM (#20238385)
Python is mostly refcounted, and I think Python is useful to put in the table because it's a common language and provides a good baseline for user-friendly scripting language performance.
Re:Why we chose Rust by cyphar on Thursday June 20, 2019 @10:06PM (#20239265)
MicroPython is a wholesale rewrite of Python, and is used in quite a few places (the ESA uses it for some of their projects).
Re:Why we chose Rust by da_chicken on Thursday June 20, 2019 @07:32PM (#20238508)
Apple's A12 and Snapdragon are both SoC and smartphones do much heavier tasks than running Java.
Re:Why we chose Rust by eridius on Thursday June 20, 2019 @07:53PM (#20238645)
From context I assume the author was talking about some sort of embedded device, not a high-power smartphone.
Re:Why we chose Rust by pjmlp on Friday June 21, 2019 @07:21AM (#20241496)
Java runs perfectly fine from smart cards, PIC, and many other kinds of micro-controllers.

Naturally they are special purpose versions and not a OpenJDK dump.

Re:Why we chose Rust by da_chicken on Friday June 21, 2019 @12:10AM (#20239804)
I guess I misunderstood the benchmark chart. The Java line shows it taking 500mb, which is absurd, but I assumed that they were running on the target platform and therefore had 500mb of RAM.
Re:Why we chose Rust by eridius on Friday June 21, 2019 @02:00AM (#20240214)
It's not clear what the chart is actually demonstrating, or why it had a "Source" link that just goes to a 4-year-old blog post about concurrency in Rust that contains no benchmarks.

My guess is the benchmark chart is just that: a benchmark. They didn't actually write their target program in 6 different languages. They probably just found a set of benchmarks that they believed to be at least somewhat representative. I really wish the article would actually explain this though.