5 ms·
Thanks for the paper. The data tables for it just proves my point. For example, in the binary-trees test, Java used 1120 Mb. Go used 228, Rust used 180, Lisp us
by nvarsj 6y ago
Thanks for the paper. The data tables for it just proves my point. For example, in the binary-trees test, Java used 1120 Mb. Go used 228, Rust used 180, Lisp used 373, Haskell used 494 Mb. Only Jruby and Erlang seem to require more memory usage. If a webapp performs similar to this experiment, I could rewrite it in almost any other language and I’d cut the required number of servers in half or more.
- pron 6y agoJava absolutely requires more memory; less so in 14, but still. That does not, however, make your point about either performance or energy, both of which are wrong. > If a webapp performs similar to this experiment, I could rewrite it in almost any other language and I’d cut the required number of servers in half or more. Nope. Because you gain in performance where you lose on memory. If you add more RAM, you'd pay for less hardware and consume less energy. Anyway, if you last experienced Java in version 8, try 14. It's not what you might remember. You'd likely see a 10-40% reduction in cost-per-transaction, plus very low pauses with the new GCs. OpenJDK's VM in 14 is just significantly different from what it was in 8.
- merb 6y agowell no matter what you are trying to say, but without valhalla and other techniques to reduce allocations java will always be slower than the languages the other poster said. no matter how good a gc gets, if it does need to do double the work of another gc it is not a problem of the gc. it is that too much allocation is needed even for simple things. java tried to tune their gc over and over instead of just fixing the problem. allocations.
- pron 6y ago> java will always be slower than the languages the other poster said That's true, and while Valhalla will help close the gap, it is important to understand that Java's goal is not to be the fastest language, but to be the language where it's easiest to get to 95% of full performance potential. I don't think any other language achieves that as well as Java. The question, then is how much you're willing to pay for that extra 5%. In other words, for every Java program X, there exists a C/C++ program Y that's at least as fast. But is the cost of writing Y worth it given the particular performance benefit? The reason Java is so popular is that the answer is very, very often no. And remember that the lower Java costs are not just in the "coding costs" of writing and maintaining, but also in observability. These days, thanks to the Java Flight Recorder, Java gives you unparalleled insight into what your application is doing for very little overhead.
- pjmlp 6y agoGUIs are a good example of that, once C++ ruled in such domains, now managed languages own it, with C and C++ left for those 5% doing the glue code with OS drivers and 3D APIs.
- merb 6y agowell it shouldn't be a rant. for my company java would've been fast enough. however we invested heavily in dotnet core, since it's easier to scale people in our region with dotnet. we are basically struggeling to find people in the java domain, the amount of people with c# knowledge in my area is so much bigger. --- however I'm personally a heavy java user (or scala should I say) unfortunatly the more things I did in c# the more I missed stuff especially in plain java. I thing the oracle takeover of java held the language back a bit for a few years. I mean if I look at the releases, they started to catch up with their new model, etc. which is good. and I think what java these days are missing is a project like django/ror or aspnet.core which drives the web forward with a fully integrated web framework that does not suck. don't get me wrong spring looks promising, but it tries to fullfil every role by being "flexible" which it probably shouldn't be. enforce something. give us a nice little ORM that is not enterprise, look at linq. and especially don't be so enterprisy.