Java Faster Than C ?

Discussion in 'Java' started by Rishi Boparai, Apr 1, 2008.

  1. Can Java be faster than 'C'? Incredible but true.
    Rishi Boparai, Apr 1, 2008
    #1
    1. Advertising

  2. RedGrittyBrick, Apr 1, 2008
    #2
    1. Advertising

  3. Rishi Boparai wrote:
    > Can Java be faster than 'C'? Incredible but true.

    With the proper JIT Java can be faster than the light!!!!!!!

    --
    Andrea Francia
    http://www.andreafrancia.it/
    Andrea Francia, Apr 1, 2008
    #3
  4. Andrea Francia wrote:
    > With the proper JIT Java can be faster than the light!!!!!!!

    Ops. I meant JIT complier.
    --
    Andrea Francia
    http://www.andreafrancia.it/
    Andrea Francia, Apr 1, 2008
    #4
  5. Rishi Boparai

    Lew Guest

    Andrea Francia wrote:
    > Andrea Francia wrote:
    >> With the proper JIT Java can be faster than the light!!!!!!!

    > Ops. I meant JIT compiler.


    "Just Invert Time" compiler?

    The program completes before you start it.

    --
    Lew
    Lew, Apr 1, 2008
    #5
  6. Rishi Boparai

    Roedy Green Guest

    On Tue, 01 Apr 2008 11:18:53 GMT, Andrea Francia
    <> wrote, quoted or indirectly quoted
    someone who said :

    >With the proper JIT Java can be faster than the light!!!!!!!

    and faster still with Jet. see http://mindprod.com/jgloss/jet.html
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Apr 1, 2008
    #6
  7. Chase Preuninger, Apr 1, 2008
    #7
  8. Rishi Boparai

    Lord Zoltar Guest

    On Apr 1, 7:18 am, Andrea Francia <>
    wrote:
    > Rishi Boparai wrote:
    > > Can Java be faster than 'C'? Incredible but true.

    >
    > With the proper JIT Java can be faster than the light!!!!!!!
    >
    > --
    > Andrea Franciahttp://www.andreafrancia.it/


    Nonesense, nothing is faster than c! :p
    Lord Zoltar, Apr 1, 2008
    #8
  9. Rishi Boparai

    Roedy Green Guest

    On Tue, 1 Apr 2008 07:15:51 -0700 (PDT), Chase Preuninger
    <> wrote, quoted or indirectly quoted someone
    who said :

    >Why, I think you are full of shit.
    >
    >http://groups.google.com/group/java-software-develoupment?hl=en


    You did two things I consider naughty.

    1. You effectively bashed Microsoft then used http://ibm.com as your
    supporting evidence. You need a more specific URL than that.

    2. It is great to provide web-based information about coding, sample
    code etc. but splitting DISCUSSION just makes it harder for anyone to
    get an answer to a question.

    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Apr 1, 2008
    #9
  10. Lord Zoltar wrote:
    > On Apr 1, 7:18 am, Andrea Francia <>
    > wrote:
    >> Rishi Boparai wrote:
    >>> Can Java be faster than 'C'? Incredible but true.

    >> With the proper JIT Java can be faster than the light!!!!!!!
    >>
    >> --
    >> Andrea Franciahttp://www.andreafrancia.it/

    >
    > Nonesense, nothing is faster than c! :p


    I realized just now. 'c' is also the speed of light! :)

    --
    Andrea Francia
    http://www.andreafrancia.it/
    Andrea Francia, Apr 1, 2008
    #10
  11. Rishi Boparai

    Daniel Pitts Guest

    Chase Preuninger wrote:
    > Why, I think you are full of shit.
    >
    > http://groups.google.com/group/java-software-develoupment?hl=en

    And you are an idiot! Please keep the language clean. Oh, and it can be
    faster than C, so he's right and you're full of ****

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
    Daniel Pitts, Apr 2, 2008
    #11
  12. Rishi Boparai

    Stefan Ram Guest

    Rishi Boparai <> writes:
    >Can Java be faster than 'C'? Incredible but true.


    There seems to have been a new benchmark execution
    that shows Jet 6.4 to be about as fast as GCC, while
    VMs also achieved impressive results, but still are
    about half as fast on the average:

    »SUN's JDK has some weak points that can be seen in the
    fannkuch and himeno benchmarks. Without these two
    benchmarks the hotspot server compiler would be almost
    competitive with GCC. Nevertheless JDK 6U6 has gained
    quite a bit performance in comparison to JDK 6U2.«

    http://www.stefankrause.net/wp/?p=9
    Stefan Ram, Jul 3, 2008
    #12
  13. Rishi Boparai

    Roedy Green Guest

    On 3 Jul 2008 02:33:00 GMT, -berlin.de (Stefan Ram) wrote,
    quoted or indirectly quoted someone who said :

    >
    > There seems to have been a new benchmark execution
    > that shows Jet 6.4 to be about as fast as GCC, while
    > VMs also achieved impressive results, but still are
    > about half as fast on the average:


    When you benchmark different code, the results have a lot to do with
    the skill of the person who tweaks the benchmark. I used to work for
    Univac fine tuning benchmarks. Tiny tweaks would let us skunk the
    competition.

    For your sort of benchmark, you need to let a representative of each
    compiler tweak the code.
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Jul 3, 2008
    #13
  14. Roedy Green wrote:
    > On 3 Jul 2008 02:33:00 GMT, -berlin.de (Stefan Ram) wrote,
    > quoted or indirectly quoted someone who said :
    >
    >>
    >> There seems to have been a new benchmark execution
    >> that shows Jet 6.4 to be about as fast as GCC, while
    >> VMs also achieved impressive results, but still are
    >> about half as fast on the average:

    >
    > When you benchmark different code, the results have a lot to do with
    > the skill of the person who tweaks the benchmark. I used to work for
    > Univac fine tuning benchmarks. Tiny tweaks would let us skunk the
    > competition.
    >
    > For your sort of benchmark, you need to let a representative of each
    > compiler tweak the code.


    This can be overdone. There's the well-known SQL benchmark where the
    winning vendor tweaked their optimizer to recognize the query text and
    return the answer immediately. (They got much slower when extra whitespace
    was added.)
    Mike Schilling, Jul 3, 2008
    #14
  15. Rishi Boparai

    Roedy Green Guest

    On Wed, 2 Jul 2008 21:11:10 -0700, "Mike Schilling"
    <> wrote, quoted or indirectly quoted
    someone who said :

    >This can be overdone. There's the well-known SQL benchmark where the
    >winning vendor tweaked their optimizer to recognize the query text and
    >return the answer immediately. (They got much slower when extra whitespace
    >was added.)


    One of the strategies for winning benchmarks is to provide the
    benchmark. If you have control over that, you can bias it to the
    party you want to win.

    The catch is, it is rare when those composing the benchmark don't have
    bias.

    Knuth has frightened people off EVER tweaking code. People don't
    realise today how tiny changes to code can give you huge boosts, or
    looked at the other way, how tiny errors in coding have huge time
    penalties.
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Jul 3, 2008
    #15
  16. "Roedy Green" <> wrote in message
    news:...
    > On Wed, 2 Jul 2008 21:11:10 -0700, "Mike Schilling"
    > <> wrote, quoted or indirectly quoted
    > someone who said :
    >
    >>This can be overdone. There's the well-known SQL benchmark where the
    >>winning vendor tweaked their optimizer to recognize the query text and
    >>return the answer immediately. (They got much slower when extra
    >>whitespace
    >>was added.)

    >
    > One of the strategies for winning benchmarks is to provide the
    > benchmark. If you have control over that, you can bias it to the
    > party you want to win.
    >
    > The catch is, it is rare when those composing the benchmark don't have
    > bias.
    >
    > Knuth has frightened people off EVER tweaking code. People don't
    > realise today how tiny changes to code can give you huge boosts, or
    > looked at the other way, how tiny errors in coding have huge time
    > penalties.
    > --


    Well, to be honest, how many programmers have ever heard of Knuth, let alone
    know what he's done, and let alone read his books? I became aware of the guy
    early in my career because I used TeX/LaTeX (itself quite rare), and later I
    bought the 3-volume set of TAoCP (and how many developers have done that?).
    Hell, I've even read parts of those books. :)

    I bring that up because it's unlikely, having never heard of Knuth, that
    most coders know the full quote: "We should forget about small efficiencies,
    say about 97% of the time: premature optimization is the root of all evil.
    Yet we should not pass up our opportunities in that critical 3%." In other
    words, go ahead and do it when the decision is informed; don't do it when
    it's not. So many programmers likely do have this vague idea that they
    should not tweak code at all, not until the last moment anyhow (when it's
    entirely possible that a tweak now becomes a hack). I've myself encountered
    the mindset often enough.

    I realize that you aren't suggesting that Knuth himself pooh-poohed all
    optimization.

    AHS
    Arved Sandstrom, Jul 3, 2008
    #16
  17. Roedy Green wrote:
    ....
    > Knuth has frightened people off EVER tweaking code. People don't
    > realise today how tiny changes to code can give you huge boosts, or
    > looked at the other way, how tiny errors in coding have huge time
    > penalties.


    Huh? Knuth's greatest work contains pseudo-code implementations in a
    sort of assembly language for a machine that never existed. Practical
    use of an algorithm from "The Art of Computer Programming" has
    to begin with reimplementation in a different language.

    Patricia
    Patricia Shanahan, Jul 3, 2008
    #17
  18. Lew wrote:
    > People who take slogans such as "premature optimization (or money)
    > is
    > the root of all evil" too literally are at a disadvantage in life
    > generally. We all have a responsibility to take such slogans as
    > overly broad and to know they're almost certainly misquoted. (It's
    > the *love of* money that's the root of all evil, not money itself.)


    As stated, it's almost a tautology. Optimization that's a good idea
    isn't premature.
    Mike Schilling, Jul 3, 2008
    #18
  19. Rishi Boparai

    Arne Vajhøj Guest

    Arved Sandstrom wrote:
    > "Roedy Green" <> wrote in message
    > news:...
    >> On Wed, 2 Jul 2008 21:11:10 -0700, "Mike Schilling"
    >> <> wrote, quoted or indirectly quoted
    >> someone who said :
    >>> This can be overdone. There's the well-known SQL benchmark where the
    >>> winning vendor tweaked their optimizer to recognize the query text and
    >>> return the answer immediately. (They got much slower when extra
    >>> whitespace
    >>> was added.)

    >> One of the strategies for winning benchmarks is to provide the
    >> benchmark. If you have control over that, you can bias it to the
    >> party you want to win.
    >>
    >> The catch is, it is rare when those composing the benchmark don't have
    >> bias.
    >>
    >> Knuth has frightened people off EVER tweaking code. People don't
    >> realise today how tiny changes to code can give you huge boosts, or
    >> looked at the other way, how tiny errors in coding have huge time
    >> penalties.

    >
    > Well, to be honest, how many programmers have ever heard of Knuth, let alone
    > know what he's done, and let alone read his books? I became aware of the guy
    > early in my career because I used TeX/LaTeX (itself quite rare), and later I
    > bought the 3-volume set of TAoCP (and how many developers have done that?).
    > Hell, I've even read parts of those books. :)
    >
    > I bring that up because it's unlikely, having never heard of Knuth, that
    > most coders know the full quote: "We should forget about small efficiencies,
    > say about 97% of the time: premature optimization is the root of all evil.
    > Yet we should not pass up our opportunities in that critical 3%." In other
    > words, go ahead and do it when the decision is informed; don't do it when
    > it's not. So many programmers likely do have this vague idea that they
    > should not tweak code at all, not until the last moment anyhow (when it's
    > entirely possible that a tweak now becomes a hack). I've myself encountered
    > the mindset often enough.


    The programmers with a formal IT education should have heard about
    Knuth.

    Arne
    Arne Vajhøj, Jul 3, 2008
    #19
  20. Rishi Boparai

    Arne Vajhøj Guest

    Roedy Green wrote:
    > Knuth has frightened people off EVER tweaking code. People don't
    > realise today how tiny changes to code can give you huge boosts, or
    > looked at the other way, how tiny errors in coding have huge time
    > penalties.


    When the word tweaking applies it is usually the wrong form
    of optimization.

    All the "is doing it with this language feature versus doing
    it with this language feature" optimization (which is what I
    consider tweaking) is usually a waste of time.

    What matters is algorithms (which BTW was what Knuth was
    writing about) and architecture.

    Arne
    Arne Vajhøj, Jul 3, 2008
    #20
    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. Replies:
    43
    Views:
    7,299
    Benji
    Nov 2, 2005
  2. Julie
    Replies:
    140
    Views:
    4,936
    George Neuner
    Jun 6, 2004
  3. Sanny
    Replies:
    12
    Views:
    560
    Andrew Thompson
    Dec 15, 2006
  4. David Segall
    Replies:
    2
    Views:
    422
    Thomas Kellerer
    Jan 2, 2007
  5. Replies:
    12
    Views:
    714
    Lionel B
    Jun 24, 2008
Loading...

Share This Page