News for hackers. Stuff that matters.
Re:Java Is Underhyped by huonib on Friday April 16, 2021 @09:17AM (#26833497)
I think the problem is because of the virtual machine, instead of being compiled to an executable. I mean GraalVM is great - but why did it take so long to develop? I mean Sun could still be alive if developers and users had instant startup times, could have easily deployed Java to servers and clients, and that it was not only faster but used way less memory.
Re:Java Is Underhyped by mnd999 on Friday April 16, 2021 @09:50AM (#26833843)
The virtual machine is (was?) the whole point. You can run the same binaries on your dev box or your server, whatever flavour of server that happens to be.

Startup times are not an issue on servers as processes are typically long-lived anyway. It is a bit of an issue on serverless (lambda etc.) but that’s a relatively new thing. High memory usage is generally poor tuning - if you give the JVM 1gb it will use it and avoid GC until it needs to. Sometimes it’s poor coding too, I’ve seen web APIs accepting files as base64 encoded json strings which is horrific server side.

Re:Java Is Underhyped by huonib on Friday April 16, 2021 @12:28PM (#26835921)
Re:Java Is Underhyped by mnd999 on Friday April 16, 2021 @01:35PM (#26836818)
Graal is very clever, but that memory example is nonsense. I just tried the Find example they give and whether the graal version beats the java version is completely dependent on Xmx.

Obviously I don't have their dataset, so it's not exactly the same test.

edit: In fact the numbers in the blog are so far off mine they may accidently have been testing /usr/bin/find.

Re:Java Is Underhyped by kaba0 on Friday April 16, 2021 @01:36PM (#26836855)
It didn’t take too long, there was AOT compilers available two decades ago as well.

There was just not much interest in it, because performance gets worth, and startup time is seldom interesting. (Pretty much only command line tools would require faster startup, and recent serverless)

And memory usage is a tradeoff. Though most of the time java could run with almost half of the currently used memory, it is unnecessary work to GC if memory is available.

Re:Java Is Underhyped by lelanthran on Monday April 19, 2021 @06:02AM (#26860941)
> I think the problem is because of the virtual machine, instead of being compiled to an executable.

I learned Java on gcj (gcc support for Java), and it generated executables. I've no idea why they killed it. Maybe someone more in the know can explain.