Slashdot Mirror


User: manthraxis

manthraxis's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. I smell some BS in the CS on Java Faster Than C++? · · Score: 1

    This is another case of a java fan skewing the statistics in javas favor. Of course by not using full optimization settings in the C++ compiler you can generate slower code than java.
    The fact is, if you know enough about how your C++ compiler compiles your C++ code you can make decisions about coding style that will ALWAYS produce faster code than java. Any JVM/JIT still doesn't know as well as the programmer what the app is trying to DO, and therefore cannot hope to achieve the level of optimization available to a human brain, except in some contrived cases where approximately equal performance can be achieved.
    REMEMBER: That JVM/JIT was written in C++ or some other similar pre-compiled HUMAN BRAIN optimized language no doubt. I can always drop into asm{} if i need that extra boost in my C++ app.. How can I do this in Java? Can't we all agree java is a great language and not get hung up on the FACT that it trades flexibility for speed, or trying to confuse the issue with meaningless statistics?
    It pisses me off that the java attitude seems to be that The Java Engineers have made a language that is so superior that you the programmer couldn't hope to make anything more optimal than what the JIT spits out.
    Also.. How can a JIT compile code fast enough to be Just In Time, but yet magically optimize the crap out of the code better than Intels C++ compiler churning through source files slowly one at a time and doing extensive analysis of how your algos work but doing it on the programmers workstation, instead of on somebodys 486 based webbrowser?... (thats Intel the CHIP MAKER who makes the CHIP that JVM is running on mind you.)
    The sad answer is IT CAN'T.

    Java is flexible for some applications and C/C++ is FASTER and sometimes less flexible for others. Get over it. Now once we get widespread adoption of native Java CPUs things may be different.. but until then, i'll keep lookin at the assembly when I want to be sure of what my code is doing on an x86.