Re: gcj compiled executable performance

Discussion in 'Java' started by Arne Vajhøj, Mar 26, 2010.

  1. Arne Vajhøj

    Arne Vajhøj Guest

    On 26-03-2010 17:18, Donkey Hottie wrote:
    > I have never earlier tested gcj as I thought it was obsolete in its Java
    > language support.
    >
    > But now I tested it with one of my apps, and here is the result.
    >
    > The application is a command line app, which processes files as input,
    > and produces one file as output. No GUI.
    >
    > I did not compile from source, but passed the already compiled (with Sun
    > javac) jar-file. Compiled fine, and resulted as a Linux-executable.
    >
    > The gcj-compiled version runs fine, and produces the output file fine,
    > no errors.
    >
    > But the gcj-compiled version is SLOW.
    >
    > Sun JRE 6:
    > real 0m33.512s
    > user 0m28.450s
    > sys 0m1.472s
    >
    > GCJ-compiled
    > real 1m46.161s
    > user 1m32.082s
    > sys 0m2.468s
    >
    > The java command gets option -Xmx256m, but the gcj-compiled did not get
    > any Java-specific options.
    >
    > Is it possible to pass that heap instruction to the gcj-compiled
    > version? Does it help?


    My test results were even worse for GCJ, but that was with 3.4.4.

    Did you use -O3 ?

    > Or is gcj really THAT bad? If it is, I wonder why they bother with gcj
    > any more.


    They apparently want a Java compiler in the collection.

    Arne
     
    Arne Vajhøj, Mar 26, 2010
    #1
    1. Advertising

  2. Arne Vajhøj

    Arne Vajhøj Guest

    On 26-03-2010 18:05, Donkey Hottie wrote:
    > On 26.3.2010 23:57, Arne Vajhøj wrote:
    >> Did you use -O3 ?

    >
    > -fno-bounds-check -O3 -ffast-math -march=native


    I think you have done what you could.

    Performance is not a reason to pick GCJ.

    BTW, I don't know of any reason.

    Arne
     
    Arne Vajhøj, Mar 26, 2010
    #2
    1. Advertising

  3. Arne Vajhøj

    Paul Cager Guest

    On Mar 27, 12:18 am, Arne Vajhøj <> wrote:
    > Performance is not a reason to pick GCJ.
    >
    > BTW, I don't know of any reason.
    >
    > Arne


    On some architectures (such as ARM) it is still the best choice.
     
    Paul Cager, Mar 29, 2010
    #3
  4. Arne Vajhøj

    Arne Vajhøj Guest

    On 29-03-2010 11:25, Paul Cager wrote:
    > On Mar 27, 12:18 am, Arne Vajhøj<> wrote:
    >> Performance is not a reason to pick GCJ.
    >>
    >> BTW, I don't know of any reason.

    >
    > On some architectures (such as ARM) it is still the best choice.


    What are the alternatives?

    Arne
     
    Arne Vajhøj, Mar 30, 2010
    #4
  5. Arne Vajhøj

    Paul Cager Guest

    On Mar 30, 12:57 am, Arne Vajhøj <> wrote:
    > On 29-03-2010 11:25, Paul Cager wrote:
    >
    > > On Mar 27, 12:18 am, Arne Vajhøj<>  wrote:
    > >> Performance is not a reason to pick GCJ.

    >
    > >> BTW, I don't know of any reason.

    >
    > > On some architectures (such as ARM) it is still the best choice.

    >
    > What are the alternatives?
    >
    > Arne


    It's a while since I looked, but they all involved paying money.... :(
     
    Paul Cager, Mar 31, 2010
    #5
  6. Arne Vajhøj

    Lew Guest

    Paul Cager wrote:
    >>> On some architectures (such as ARM) it [GCJ] is still the best choice.

    >


    Arne Vajhøj wrote:
    >> What are the alternatives?

    >


    Paul Cager wrote:
    > It's a while since I looked, but they all involved paying money.... :(
    >


    Communist!

    Seriously (and that was a joke, btw), money isn't a Bad Thing. Some
    things are worth what you pay for them, and that goes for some free
    things, too.

    Ergo you have not answered the question of what makes GCJ the best
    choice for ARM architectures, nor what the alternatives are.

    Suppose (and I don't know what the facts are here) that Brand X JVM
    for ARM costs some money and Brand Y is free, but that Brand Y is
    insufficient to the task due to incompatibilities, incomplete
    implementation or some other difficulty. Brand Y would not be the
    best choice.

    I am interested in the answers to Arne's questions as well - what are
    the reasons, if any, to pick GCJ over the alternatives, and what are
    the alternatives?

    --
    Lew
     
    Lew, Mar 31, 2010
    #6
  7. Arne Vajhøj

    Arne Vajhøj Guest

    On 31-03-2010 15:42, Lew wrote:
    > Paul Cager wrote:
    >>>> On some architectures (such as ARM) it [GCJ] is still the best choice.

    >>

    >
    > Arne Vajhøj wrote:
    >>> What are the alternatives?

    >
    > Paul Cager wrote:
    >> It's a while since I looked, but they all involved paying money.... :(

    >
    > Communist!


    It is the very essence of capitalism to pay the least possible.

    > Seriously (and that was a joke, btw), money isn't a Bad Thing. Some
    > things are worth what you pay for them, and that goes for some free
    > things, too.
    >
    > Ergo you have not answered the question of what makes GCJ the best
    > choice for ARM architectures, nor what the alternatives are.
    >
    > Suppose (and I don't know what the facts are here) that Brand X JVM
    > for ARM costs some money and Brand Y is free, but that Brand Y is
    > insufficient to the task due to incompatibilities, incomplete
    > implementation or some other difficulty. Brand Y would not be the
    > best choice.
    >
    > I am interested in the answers to Arne's questions as well - what are
    > the reasons, if any, to pick GCJ over the alternatives, and what are
    > the alternatives?


    I think he has.

    He likes the price tag.

    Arne
     
    Arne Vajhøj, Apr 1, 2010
    #7
  8. Arne Vajhøj

    Paul Cager Guest

    On Mar 31, 8:42 pm, Lew <> wrote:
    > I am interested in the answers to Arne's questions as well - what are
    > the reasons, if any, to pick GCJ over the alternatives, and what are
    > the alternatives?
    >
    > --
    > Lew


    I'm afraid I'm not going to be much help, as I can't remember any
    further details. The situation may well have changed somewhat since
    then, anyway.

    Now that Java is free (as in freedom) maybe we'll see some OpenJDK
    derived runtimes. The sticking point for me is the speed of the
    interpreter (no JIT).

    Cheers,
    Paul
     
    Paul Cager, Apr 4, 2010
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Josephine Schafer
    Replies:
    1
    Views:
    3,631
    Philip Morley
    Jul 21, 2003
  2. Klaus Schneider
    Replies:
    1
    Views:
    584
    Rolf Magnus
    Dec 2, 2004
  3. lander
    Replies:
    5
    Views:
    627
    bruce barker
    Mar 5, 2008
  4. Roedy Green
    Replies:
    1
    Views:
    407
    Arne Vajhøj
    Mar 28, 2010
  5. EJP
    Replies:
    4
    Views:
    398
Loading...

Share This Page