Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Java is not very fast compared to c++, or you'd see it in embedded systems all over.


> Java is not very fast compared to c++, or you'd see it in embedded systems all over.

Those are quite different domains, with only minimal overlap.

Embedded systems more often that not are not seeking maximum performance. What matters is smaller code size and running on mimimal hardware. Java doesn't do so well there since you have the overhead of the VM. Java is rarely a sensible choice for embedded code. Just use simple C, or rust if it works for the use case.

(Yes I know project green was originally about embedded set-top boxes! But times changed.)

Performance critical systems are usually large servers for either high througput (web or other server traffic) or low latency (HFT) applications. The opposite end of the spectrum from embedded. That's where Java shines. You might be able to beat Java with carefully hand-tuned C++ but just as likely the JIT might beat you. So for maximum performance server code combined with a more sane developer productivity, Java cannot be beat.


I understand, but the topic of this article is about embedded systems. Java is not a player here.


what's fast really depends on lot on what you are building - without more details about the challenge at hand any statements about performance are unhelpful. A huge backend system? The logic in a toaster? A space ship?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: