Re: Help me!! Why java is so popular



On Feb 11, 12:22 am, Lew <l...@xxxxxxxxxxxxxxxxxxxx> wrote:
raddog58c wrote:
Well written code in a language like C optimally compiled for the
native environment is going to be tough to beat unless you write in
native assembler langauge. I have actually had to write in native
assembler on more than one occasion in real-time systems where
nanoseconds mattered. That's atypical, but these situations do
exist. Anyone suggesting an interpreted language is the way to go in
these environments either has no understanding of the problem space,
or they've got a lot of explaining to do to make that assertion stick.

Others have pointed out that the JIT compiler can beat compile-time
optimizations in some cases by virtue of having a different view of the
situation. Escape analysis, for example, is a runtime phenomenon.

Because JVM optimizations are global and dynamic, whereas compile-time
optimizations are more local and static, the JVM may actually achieve
significantly better performance because it follows different analysis paths.
This could, and according to what I've read, does achieve far better
performance than "C optimally compiled" code.

Myths are supported by misguided intuition. Reality often moves in surprising
ways.

- Lew

Fair enough, but the key words are "may" and "could" -- often they
will not, particularly in situations where there really is no
alternative improvement. In that case the additional overhead to
store, manage and reference a knowledge base "may" and "could" further
deplete resources and degrade the overall system's throughput.

It's really 100% context sensitive.

.



Relevant Pages

  • Re: Help me!! Why java is so popular
    ... native assembler langauge. ... Because JVM optimizations are global and dynamic, whereas compile-time optimizations are more local and static, the JVM may actually achieve significantly better performance because it follows different analysis paths. ...
    (comp.lang.java.programmer)
  • Re: object system...
    ... specifically as it affects optimizations. ... a reference proving register optimizations violate a specification? ... compile-time evaluation of if and while loops; ...
    (comp.object)