News for hackers. Stuff that matters.
Re:The Next Twenty Years of Java: Where We've Been and Where... by coldtea on Thursday June 04, 2015 @06:30PM (#9662608)
>The JVM is still slow

What are you talking about? It's the fastest widely deployed VM out there...

Re:The Next Twenty Years of Java: Where We've Been and Where... by sanderjd on Thursday June 04, 2015 @07:36PM (#9662940)
It's always fun to see how different people throw around the seemingly-absolute terms "slow" and "fast" when there is always some other platform they're implicitly comparing to. I had a chuckle about this the other day as I was evaluating BEAM for potentially running a re-write of a Rails app; I was thinking how pleasant it was to use a platform so fast when I came across people ridiculing how slow Erlang is (presumably relative to C++ or even the JVM).
Re:The Next Twenty Years of Java: Where We've Been and Where... by tormeh on Thursday June 04, 2015 @08:33PM (#9663152)
Those people don't get the point of Erlang. You'd have to be completely oblivious to complain about performance on the Erlang VM. The Erlang developers will always sacrifice performance and everything else in favor of reliability and response time. Consider that every actor has its own heap and GC. That's slightly absurd, honestly, but it makes sense when you think about Erlang's goals. I just get so frustrated when people say things like that.
Re:The Next Twenty Years of Java: Where We've Been and Where... by codesushi42 on Thursday June 04, 2015 @09:07PM (#9663265)
Indeed, these claims always lack context of what is being attempted. If you are using Erlang to perform matrix multiplications on large datasets or some kind of CPU intensive work, you're probably barking up the wrong tree.

But if you want to parallelize and distribute less CPU intensive tasks and have fault tolerance, then it's a good choice.

Re:The Next Twenty Years of Java: Where We've Been and Where... by fleitz on Thursday June 04, 2015 @08:23PM (#9663120)
Being the fastest VM doesn't make a VM fast. It's just faster than other slow things.
Re:The Next Twenty Years of Java: Where We've Been and Where... by tormeh on Thursday June 04, 2015 @08:35PM (#9663158)
True, but thankfully the JVM is faster than most compiled languages as well.
Re:The Next Twenty Years of Java: Where We've Been and Where... by fleitz on Friday June 05, 2015 @12:25AM (#9663894)
Yes, that's why modern triple A titles are written on the JVM.

The JVM can generate faster numeric code than C++ in limited instances and when writing in C/C++ style. And then when you want to be faster than java you drop down to ASM and use a few SIMD instructions.

In the general case when you write real applications it's much slower. Not to mention that no one wants to drop 12 frames waiting for GC.

Re:The Next Twenty Years of Java: Where We've Been and Where... by danieldk on Friday June 05, 2015 @02:55AM (#9664208)
Why does someone bring up game performance when the discussion is about JVM versus native code? Languages with a GC compiled to native code have the same problems, even C/ASM calls can be relatively expensive in languages compiled to native code (e.g. see Go).

There are many other classes of applications outside games where a few milliseconds of garbage collection are acceptable. It is no surprise that many server applications are written in JVM languages - the 2x C/C++ performance is acceptable when people get a lot of instrumentation, more safety, etc.

Re:The Next Twenty Years of Java: Where We've Been and Where... by fleitz on Friday June 05, 2015 @01:52PM (#9666869)
Java is rarely 2x faster than C/C++.

I would say the primary reasons server apps are written in Java is the enterprise support and giant ecosystem as well as number of developers who can write java. The performance on the server is decent, and great compared to ruby/python.

People bring up video games because they are the most demanding apps most people run. Similarly you'll see apps like Photoshop, Office, etc written in C++.

Languages with a GC blah blah blah don't matter because no one writing C++ for performance uses a GC with it. I'm comparing C++ to Java for real world apps not language benchmarks, etc. C++ would not be my first choice for a web app because the task is trivially parallelizable and you get little improvement in string copying between C++ / Java / etc which is the primary thing web apps do, copy strings.

Re:The Next Twenty Years of Java: Where We've Been and Where... by twp on Thursday June 04, 2015 @07:07PM (#9662794)
If you want to talk about "widely deployed VMs" then Dalvik is faster. If you want to talk about VMs in general then there are many that are faster, e.g. LuaJIT.
Re:The Next Twenty Years of Java: Where We've Been and Where... by coldtea on Thursday June 04, 2015 @07:35PM (#9662934)
Actually no, Dalvik is slower than the JVM and with worse GC.

And LuaJIT faster than the JVM? Where you got that? You wont fine many benchmarks or people agreeing with you. LuaJIT is faster (much) than most scripting languages, but not faster than Java.

Are you comparing startup time?

Re:The Next Twenty Years of Java: Where We've Been and Where... by danieldk on Friday June 05, 2015 @03:01AM (#9664227)
Dalvik is ~3x slower than JVM for compiled (JITed) code (on an ARM Cortex A8):

https://dl.acm.org/citation.cfm?id=2388956