Announcement

Collapse
No announcement yet.

Java Benchmarks: OpenJDK 8 Through OpenJDK 19 EA, OpenJ9, GraalVM CE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by cynic View Post

    how many app developer thinks will be able (or will even be interested) in learn C++? not to talk about Rust...
    Well, java is not easier than C++, so why waste your time learning java instead of C++? There is a legit reason, but is not the language itself.

    Originally posted by cynic View Post

    Java might not be the most optimized language for a phone but has an incredible ecosystem of library and tools that allow people with "not-so-great" programming skills to write apps.
    Not exactly. At least the android ecosystem is extremely hostile to anything non-java. I had tried in the past to write a C android app and it was impossible (with NDK it could be mostly C but it could not be completely java-free). I have not tried iOS, so I have no experience on that side. This is the legit reason I was saying above...

    Originally posted by cynic View Post
    those apps are worth a lot of money for Google, for the phone makers and for the depeloper themselves.
    I don't care! For me they are bad, slow and power hungry.

    Originally posted by cynic View Post
    Beside that considerations, Java is good.
    I can write an entire assay on why I disagree with this statement.

    Comment


    • #32
      Originally posted by cynic View Post

      (the borrow checker surely would find something to bother me for every time I try to make a call )
      It will for sure solve your memory problems

      Comment


      • #33
        Originally posted by bug77 View Post

        Ignorance is bliss I guess. You use Java (and more recently Kotlin) to develop for Android, but Android has never used any of the benchmarked runtimes. It used its own runtime (applying whatever optimizations it wanted), but it got rid of it long, long ago (Android 5, iirc). Everything that ran on Android since is pre-compiled code.
        Not to mention there was always the Android NDK. But you go ahead and keep hating on Java.
        this is phoronix forums... wrong place to look for objectivity most of the time

        Comment


        • #34
          Every time there's a discussion of anything, trolls come in blasting anything that doesn't have the speed of well-written C++.

          If they spent 0.5% of the time they waste making fun of Java/Python/PHP/Ruby/whatever instead writing code, we'd all be using their wonderful high performance C/C++/Rust applications.

          Keep trolling, guys. I'm sure eventually it's going to fix everything if you just complain loudly enough.

          Originally posted by marios View Post

          Well, java is not easier than C++, so why waste your time learning java instead of C++? There is a legit reason, but is not the language itself.
          I've worked professionally in both, Java is a cakewalk next to C++.

          Comment


          • #35
            Originally posted by marios View Post
            Not exactly. At least the android ecosystem is extremely hostile to anything non-java. I had tried in the past to write a C android app and it was impossible (with NDK it could be mostly C but it could not be completely java-free). I have not tried iOS, so I have no experience on that side. This is the legit reason I was saying above...
            and... ?
            I say nothing about the relationship between Android and other languages.

            I just wrote that Java has a lot of tools.

            Originally posted by marios View Post
            I don't care! For me they are bad, slow and power hungry.
            if you prefer quality over quantity that's fine and to some extent I may also agree with you on that, but I belive that Google and all the developer prefer to gain money.


            Originally posted by marios View Post
            I can write an entire assay on why I disagree with this statement.
            Oh, I'm sure you can.
            Each of one can write an essay on how a given technology or language is good and every other of one can write an essay on how that same technology is bad.
            this does not surprise me.

            Comment


            • #36
              Originally posted by er888kh View Post

              It will for sure solve your memory problems
              sure.
              anyway, I prefer to keep my mind health and that's why I've learn Rust to never use it on a daily basis.

              I let Java and Go take care of memory for me, and they're doing a great job.

              Comment


              • #37
                Originally posted by marios View Post
                Well, java is not easier than C++, so why waste your time learning java instead of C++? There is a legit reason, but is not the language itself.
                I am not sure to agree. C++ has some constructs that allow the programmer easily to shoot on theirs foots: it allows you to access memory without any further protection, so it is quite easy to dereference a null pointer or an invalid memory region. Worse sometime these error don't raise always an error.

                Yes the last C++ standards introduce a lot of utility to avoid the C++ raw pointer, but these will require a lot of time to be more widespread. We are discussing not only about the program developers, but also the library developers....

                The GC remove a lot of responsibility from the programmer. Moreover Java avoids some C++ features (like the operators overloading and the multiple classes inheritance ) to reduce the likelihood of programmers mistakes.

                The last time that I wrote a app for android (yes it is not Java really but...) I appreciate the Java syntax and semantics. The anonymous classes were so beautiful...

                So I think that in general Java is simpler than C++. However some thing that can be done in C++ (i.e. an interrupt handler on Arduino), cannot be done in Java.

                On the other side, the GC suck from a performance point of view because when it works it increases the latency in a not predictable way. The same for the JIT optimizer.

                Another problem of java is that it is so huge that it is becoming more complex to package (see https://lwn.net/Articles/897198/).

                I don't think that Java is better of C++, however I think that a not high skilled programmer (yes these exist) is more productive in Java than C++.

                But I know also people more productive in ASM than in C++ :-)

                Comment


                • #38
                  Originally posted by cb88 View Post

                  Newer is faster? Is it?
                  Yeah, look at the benchmarks again. Other than the massive outlier of 8 (being faster than all the others), the trend is pretty clear.

                  The JDK 8 perhaps java peaked then... and much of the stuff after that is micro optimisations and bloat, Java 8 is the closes in this list to Sun Java only 4 years after the buyout. I wouldn't mind seeing Java 6 and 7 in this benchmark also.

                  Just for some context... performance wise Java hotspot has been out since Java 1.2... and had been in development for a around 15+ years by the time Java 8 was released so extremely mature.
                  That reasoning doesn't line up with reality either due to the obvious trend in later versions. However, tests against 6 or 7, and against the latest patches of 8 and 11 that someone else suggested, might in fact shed more light on this.

                  Comment


                  • #39
                    Originally posted by bug77 View Post

                    It does fewer things. No modules support, no records, no enhanced switch statements...
                    The only thing of those introduced in Java 9 are modules, and I don't see why they would cause this large regression (or any, for that matter). Another Java 9 change that may impact performance may be the new GC, but that doesn't explain why the regression seems to be particularly pronounced on I/O heavy benchmarks.

                    Comment


                    • #40
                      Where can I get one of these Java mugs? Or were they conference-exclusive?

                      Comment

                      Working...
                      X