back to article Reality check: Java 8 finally catches a multi-core break

Two years later than planned, Oracle has made Java ready for a multi-core processor world. The database giant has announced general availability of Java 8, calling it a “major new release”. Java 8 is important because it’s the base spec for Java Enterprise Edition, as well as feeding the free and open-source implementation of …

COMMENTS

This topic is closed for new posts.
    1. Amorous Cowherder
      Facepalm

      Re: Good performance? Scalable?

      Get real!

      Peter Van Der Linden was saying Java's performance was miles better back in 1999! FFS! It fair screams along these days and is easily the match of almost any compiled language. Granted it was shit when we were using for applets ( remember coding those anyone? ) back on basic Pentium boxes around '96.

      Can't see that Google would base their entire mobile O/S on a poorly performing language where there are limited resources and almost every CPU cycle counts!

    2. James Anderson

      Re: Good performance? Scalable?

      Any decent (not over engineered!) java program will run at about 1 and a half times the speed of the equivalent C++ program.

      The difference is the Java will be debugged and in production while the C++ programmer is still trying to sort out his memory leak in between arguing with his colleagues over what Soustrup really meant to say in chapter 13.

    3. Anonymous Coward
      Anonymous Coward

      Re: Good performance? Scalable?

      "Java's performance is abyssmal, as is it's scalability".

      You see, that's a drawback of posting as AC. No one has any idea where you come from, or what your motives are. Your statement is factually untrue, yet it is couched in very decided and forceful language. Why are you so keen to talk Java down? Are you an M$ shill, or just someone who tried Java without sufficient study and preparation?

      Without any of that information, we are (alas) likely to draw the worst conclusions.

      By the way, there is only one "s" in "abysmal". And Lynne Truss will be calling on you to explain the proper use of apostrophes. I often wonder about the implications for a person's ability to design and write complex code, when they can't even manage the relatively simple task of writing plain English.

      1. Anonymous Coward
        Anonymous Coward

        Re: Good performance? Scalable? @Tom Welsh

        "Without any of that information, we are (alas) likely to draw the worst conclusions."

        Specious bollocks. You're just guaranteed to use it as an excuse to dismiss anything you don't like.

        "By the way, there is only one "s" in "abysmal". And Lynne Truss will be calling on you to explain the proper use of apostrophes. I often wonder about the implications for a person's ability to design and write complex code, when they can't even manage the relatively simple task of writing plain English."

        I wonder too, but realise using it as an attempt to discredit someone is even more feeble than the AC bullshit you're pulling.

        Different AC, but then you won't want to believe that, will you?

        1. Anonymous Coward
          Anonymous Coward

          Re: Good performance? Scalable? @Tom Welsh

          "Different AC, but then you won't want to believe that, will you?"

          The whole point is that it doesn't matter what I believe. I have no way of knowing for sure.

      2. JDX Gold badge

        Re: Good performance? Scalable?

        It's daft to call someone a MS shill for talking down Java, when the exact same ignorant arguments can be levelled at .NET (slow, interpreted, etc).

        1. Anonymous Coward
          Anonymous Coward

          Re: Good performance? Scalable?

          "It's daft to call someone a MS shill for talking down Java, when the exact same ignorant arguments can be levelled at .NET (slow, interpreted, etc)".

          Your remarks are not logical. The AC whom I criticized had attacked Java, not .NET. The fact that .NET is, arguably, open to a similar attack has nothing to with it.

          If I were to criticize you for being illogical, my comments would not be proved invalid if someone were to show that I, too, was sometimes illogical.

          1. JDX Gold badge

            Re: Good performance? Scalable?

            It is illogical to attack a product which competes against your own with arguments which can equally well be levelled at your product by the type of uneducated person who just hears something on the web and parrots it. It increases 'awareness' of criticisms generally. It's not in MS' interest to have people talking about "how interpreted languages are slow".

      3. dogged

        Re: Good performance? Scalable?

        > Are you an M$ shill

        That's against the House Rules, be careful.

        Also logically unlikely. MS have a lot invested in JIT-based technology and don't especially pimp their C++ compiler (except, bizarrely, where it's Managed C++ and therefore using JIT anyway).

        The "lolz me so superior me no use M$" thing may give you an erection but it's not helping your rational thought much.

    4. MadMike

      Re: Good performance? Scalable?

      NASDAQ's largest stock exchange system called INET, and their largest derivative system called Genium INET are both completely or partly written in Java. Now I am talking about the crucial matching engine which handles all incoming orders. The matching engine needs to be extremely fast, as there are lot of High Frequency Traders capitalizing on speed. The worlds fastest and largest stock exchange systems, are written in Java or C++. NASDAQ claim to have the fastest exchange system in the world, and with greatest capacity with latency downwards 100 microseconds or faster, and throughput of millions of orders. As both systems are written in Java, the secret sauce is to avoid trigger the garbage collector. This is done by preallocating all objects and reuse them, so they will never be garbage collected. With garbage collection out of the way, you can reach extreme performance, suitable to the fastest and largest systems in the world, juggling billions of USD every minute.

      So, no, Java is not slow. Exchanges rely on speed, that is how they attract customers. Slow exchanges are not interesting for HFT firms. If the exchanges could rewrite their systems from Java to C++ for faster performance, they would. But they dont. And also, the fastest HFT firms are sometimes using Java in their most critical parts. Others use C++.

  1. JeeBee

    Luckily Java has had multi-threaded development capability since day 1, and this isn't the first time it has been made easier to use - the Java Concurrent frameworks are now very old, for example.

    What the lambda expressions actually do is allow the programmer to express, concisely (a big problem with Java, previously you would have had a bulky inner class implementing a functional interface) a more functional model of programming that so happens to also make it easily multi-threaded.

    1. JDX Gold badge

      Are Java lambdas similar to C#/C++ - nameless functions - or something else? How exactly does this allow automatic multi-threading where doing for(Object o : collection) doesn't? And, do C# lambdas also do automatic multithreading?

      1. dogged

        Stop right there.

        C# does have anonymous functions but those are a different beast (although you can invoke them with lamdas). Lamdas provide support for anonymous delegation.

        No, lamdas do not provide automatic multithreading (and I would bet good money that they won't in Java either) but the syntax does make it simple to delegate to another thread.

        1. sabroni Silver badge
          Coat

          Fail!

          Llamas provide wool, silly!

      2. kovesp

        The connection isIndirect. Introducing lambdas (more or less functions as first class objects) allowed the redesign of collections in a stream oriented way. That in turn allows the implementation of the algorithims to be vectorised and be amenable to multi core execution.

  2. Dan 55 Silver badge
    Headmaster

    "as you’re packing in less lines of code that’s serving simply as plumbing."

    Fewer!

    And I don't like the look of "that's" either.

    1. Michael Wojcik Silver badge

      Re: "as you’re packing in less lines of code that’s serving simply as plumbing."

      Fewer!

      Stylistically, that would be my preference as well, albeit only due to familiarity; but insisting on the distinction is suspect pedantry. Even prescriptivists have a hard time justifying this particular shibboleth. "Less" applied to countable objects has a long pedigree, and though there is considerable and apparently growing affection for preferring "fewer" for discrete quantities, the former usage is still well-represented. The AUE FAQ has more.

      In any case, by far the better change would be to eliminate the redundant and awkward phrase "lines of". Better yet, rephrase the entire clause, and quite possibly the entire sentence it comes from.

  3. A Non e-mouse Silver badge

    Java has always supported multi-cores. Java was designed to support multiple threads (and Unicode) from the off.

    Lambda expressions don't "add" multi-core support. They add functional programming to Java which has up to now been strongly object-oriented.

    1. JDX Gold badge

      Nobody said it didn't support threads. But you had to create and run the threads yourself, make sure they don't fight over the same data dangerously, etc... this is the traditional model of multi-threading very similar to using threading in MFC/Win32. More modern approaches mean parallel logic can be automatically split off to threads without you having to do it, in a similar idea to how Java doesn't make you have to manage memory, but does it for you.

    2. Peter Mount

      No lambda expressions don't add the multi-core support but the new stream api (which can use them) does, and a lot more.

      It's been a long time coming but it's finally good to see it's finally out.

  4. Ben Liddicott

    Only 6 years after C#...

    It's not just a better Java.

    It's a much better Java.

    1. Anonymous Coward
      Anonymous Coward

      Re: Only 6 years after C#...

      "It's not just a better Java.

      It's a much better Java."

      Yeah, but then so was Smalltalk-80

    2. Stephen Channell
      Meh

      Re: Only 6 years after C#... and 3 years after C++

      I respect (but don't like) the way they've implemented lambdas without proper type inference to ensure it is only used for anonymous classes and not functional code like Scala, C# and C++.. it reminded me of the incremental updates to COBOL.

  5. Anonymous Coward
    Anonymous Coward

    Just a question: "utilize"?

    As a non-English speaker I'd welcome it if someone could point me at a plausible differentiator between "use" and "utilize". As far as I'm concerned, it's just used/utilised (I like UK English, hence "s") to make things sound more managerial in places where "use" would do just as well.

    Not a grammar nazi, just genuinely curious. I have as yet not been able to figure this one out..

    1. Anonymous Coward
      Anonymous Coward

      Re: Just a question: "utilize"?

      and why "administrate" over "administer" ?

      But yes, that's a rhetorical question.

      No point trying to hold back the tide. Like Canute. Or Canutility.

      1. Trixr

        Re: Just a question: "utilize"?

        Sorry, "administrate" is simply WRONG. Administrators *administer* things, IT system or not.

        Anyone who uses it looks ignorant as hell, frankly.

        As to "utilise", yup, 9 times out of 10, it's just management-wank-speak. I don't actually think I've seen it used accurately in an IT brief.

        "Utilise" can also mean that you use something for a purpose it's not specifically designed for - you can use a screwdriver to turn a screw, or you can utilise a kitchen knife. Same concept as the "making useful" meaning described above.

      2. Anonymous Coward
        Anonymous Coward

        Re: Just a question: "utilize"?

        'and why "administrate" over "administer" ?'

        "Administrate" is a verbal outrage, for which there is no excuse. Although some people tend to write and speak badly, we should never accept it passively. Language is everyone's common possession, and when badly used it smothers and hinders everything we do together.

        The mechanism by which such words arise is psychologically simple enough. From "administer" we produce the noun "administration". Then someone ignorant hears that, and produces the back-formation "administrate". Similarly, people have commented on things for centuries. Then a new job appeared: commenting on sports events. Because "commenter" sounds a bit clumsy, these people were called "commentators". And that led to the erroneous back-formation "commentate".

        1. Havin_it
          Mushroom

          Re: Just a question: "utilize"?

          Agreed. There is a special place in Hell for "administrate", and "burglarize" can keep it company!

          1. Anonymous Coward
            Anonymous Coward

            Re: Just a question: "utilize"?

            "There is a special place in Hell for "administrate", and "burglarize" can keep it company!"

            Good point - I must add that to my list. There is, of course, a perfectly good verb "to burgle".

    2. FutureShock999

      Re: Just a question: "utilize"?

      I am not a grammar nazi or an English teacher, but have been told I write well. So as a practical matter, I prefer "use" to talk about a transitional relationship - i.e., "I used the shovel for 5 minutes to dig a hole." I would prefer "utilise" to say that something is more permanently incorporated in a function, i.e., "this new car utilises a huge V8 to get 600hp and fantastic acceleration". It is clear that the car is going to have that V8 under the hood for quite some time. Or, you could more topically say that "this class utilises this subclass to provide transparent multi-threading". Unless you re-write the class, it will always have that utilisation.

      Not saying that in practical conversation you can't say "this class uses this subclass". It works, they are synonyms. But I like to differentiate, and I have seen similar uses from other authors.

      Just don't get me started on "utilise versus utilize". Please.

      1. Richard Plinston

        Re: Just a question: "utilize"?

        > and I have seen similar uses from other authors.

        Given that their writing would be more than transitional, surely that should be:

        "and I have seen similar utilisations from other authors."

        (actually it should be "usages")

      2. Anonymous Coward
        Anonymous Coward

        Re: Just a question: "utilize"?

        Of course, a dictionary is still a useful resource. I like the Oxford English Dictionary, which focuses on British English but usually notes American differences. For "utilize", it says:

        utilize or utilise

        n verb make practical and effective use of: he was determined to utilize the new technology.

        DERIVATIVES

        utilizable adjective

        utilization noun

        utilizer noun

        ORIGIN

        C19: from French utiliser, from Italian utilizzare, from utile (see utile1).

    3. This post has been deleted by its author

    4. Anonymous Coward
      Anonymous Coward

      Re: Just a question: "utilize"?

      "if someone could point me at a plausible differentiator between "use" and "utilize"."

      There isn't one. However one of the laws of the corporate workplace is the more syllables you use/utilise , the more intelligent you sound to your peers. Ergo (and a bit of latin helps too) , some people love using long words where short ones would work just fine.

    5. Irony Deficient

      Re: Just a question: "utilize"?

      Non-English-speaking Anonymous Coward, yes, it’s common in some areas to use utilize as an overstuffed synonym for use. The proper meaning of utilize is “to make useful”, e.g. “I finally utilized that chocolate teapot — as an afternoon snack for my co-workers.”, as opposed to trying to use it as a teapot.

      1. Anonymous Coward
        Anonymous Coward

        Re: Just a question: "utilize"?

        "“I finally utilized that chocolate teapot"

        Thats no different to saying "I finally used that chocolate teapot". You simply put it in the past tense. There's no difference in meaning.

        1. Irony Deficient

          Re: Just a question: "utilize"?

          boltar, saying I finally used that chocolate teapot means that it was used as a teapot. Saying I finally utilized that chocolate teapot means that it was made useful, which excludes use as a teapot.

        2. Michael Wojcik Silver badge

          Re: Just a question: "utilize"?

          "“I finally utilized that chocolate teapot"

          Thats no different to saying "I finally used that chocolate teapot". You simply put it in the past tense. There's no difference in meaning.

          You're quite wrong, and missing an apostrophe.

          "utiliize", as Irony Deficient pointed out, denotes "make useful". Literally it means "cause to have utility". That is very different from "use", which denotes consuming the utility of the object.1 If you're unable to perceive the difference, may I suggest a course in critical thinking?

          "Utilize" is often - perhaps most often - used as a bloated synonym for "use", true, but that does not mean there is no denotative distinction between the words.

          1This may be "consume" in the non-diminishing sense, as one consumes the text of a book in reading it.

        3. Philip Hodges

          Re: Just a question: "utilize"?

          how about: "I finally found a utilize for that chocolate teapot".

    6. Anonymous Coward
      Anonymous Coward

      Re: Just a question: "utilize"?

      The canonical Dilbert reference is http://search.dilbert.com/comic/Facilitator (the bottom two strips). Note that the PHB insists on longer, more pompous, rather soggy bureaucratese. "Utilize" instead of "use", "implement" instead of "do", even marginal lengthenings such as "object-orientated" instead of the proper "object-oriented". In most of these cases there is a small difference in meaning, but usually that is not the point. Some people just like to sound more important, and believe that using longer and finer-sounding (to them) words will achieve that.

      Sir Winston Churchill, generally acknowledged to be a good speaker and writer, put it this way:

      "Broadly speaking, short words are best, and the old words, when short, are best of all". (Speech on receiving the London Times Literary Award, November 2, 1949)

      See also George Orwell's brilliant essay "Politics and the English Language", every word of which rings as true today as it did when written 70 years ago.

      http://en.wikipedia.org/wiki/Politics_and_the_English_Language

  6. Conrad Longmore
    Thumb Down

    Java on the desktop is dead

    Java on the desktop is dead, it's primary use these days seems to be to infect your computer with malware. The best thing to do is deinstall it. I bet about 99% of people will never need it.

    Servers and mobiles seem to be a success area, but really it's depressing to see smartphones running Java apps..

    1. Anonymous Coward
      Anonymous Coward

      Re: Java on the desktop is dead

      but really it's depressing to see smartphones running Java apps..

      Yes, they should only be using whatever language you know.

    2. Destroy All Monsters Silver badge
      Headmaster

      Re: Java on the desktop is dead

      Java on the desktop is dead, it's primary use these days seems to be to infect your computer with malware. The best thing to do is deinstall it. I bet about 99% of people will never need it.

      Sounds like random shock talking points from one of the "N arguments to make the heads of [some political opponent you want to antagonize today] explode" posts that one can regularly find on confusenik websites, written by people actually unable to develop a coherent train of thought.

      Servers and mobiles seem to be a success area, but really it's depressing to see smartphones running Java apps

      Which ones run Java?

      1. Orjan

        Re: Java on the desktop is dead

        Which ones run Java?

        The preferred development platform on Android is the Dalvik engine, which is Google's implementation of a Java VM.

        1. Destroy All Monsters Silver badge
          Headmaster

          Re: Java on the desktop is dead

          the Dalvik engine, which is Google's implementation of a Java VM

          U wot M8?

          It's not even a stack machine.

        2. Richard Plinston

          Re: Java on the desktop is dead

          > the Dalvik engine, which is Google's implementation of a Java VM.

          Yes, except it is not 'Google's'* nor is it a Java VM**.

          ART*** is Google's new Dalvik VM.

          * """It was originally written by Dan Bornstein"""

          ** """Unlike Java VMs, which are stack machines, the Dalvik VM uses a register-based architecture."""

          *** """a replacement, called Android Runtime (ART), that should improve the performance of Android apps by a huge margin."""

    3. Orjan

      Re: Java on the desktop is dead

      Java on the desktop is dead, it's primary use these days seems to be to infect your computer with malware.

      Actually, I suspect its primary use these days is to run the 6th most best selling PC game of all times. Wikipedia says:

      By March 2012, Minecraft had become the 6th best-selling PC game of all time. As of February 3, 2014, the game has sold over 14 million copies on PC and over 35 million copies across all platforms.

    4. Kubla Cant

      Re: Java on the desktop is dead

      @Conrad Longmore: citation required.

      I'm not aware of much use of Java for locally-hosted desktop applications, but I don't have the advantage of your omniscience.

      I can assure you, however, that it's extensively used via applets and Web Start applications. I used to think that applets were just a way of embedding gadgets in web pages, and that they were obsolete when better HTML and client script came along. Since then I've worked on several market-leading trading platforms that are written in Java and delivered over the Web.

      1. Androgynous Cupboard Silver badge

        Re: Java on the desktop is dead

        Applets? Maybe, but not for much longer. And I say this as someone who develops them - I can not in good conscience recommend them to my clients any more, as we can't guarantee they'll run from one release to the next due to unpredictable changes in the security model. Applets are dead.

      2. Anonymous Coward
        Anonymous Coward

        Re: Java on the desktop is dead

        Agreed. Anyone claiming that Java is dead on the desktop should visit software houses developing trading platforms for banks.

        I use to work on one of those. There was simply no other choice. General observation is Java is flexible enough to allow work-arounds for all its failings at that time.

        My only problem is the way articles are scripted here with loop holes that gets so easily picked up.

This topic is closed for new posts.

Other stories you might like