Re: Help me!! Why java is so popular




Or it could cover the gap 200%.

You are basically proving that Java is not efficient by assuming so.

Meaning you proved nothing.

Arne

I wasn't trying to prove anything. Common sense says if you have to
convert from one format to another before you begin executing, you
have an extra step and obviously all things being equal you are not as
efficient, period, end of sentence.

Converted code that's more efficient you could make up for the
conversion - it would depend on the problem space, run duration, and
how well/badly each program were written. The converted code would
need to be more efficient to have a chance to make up for the extra
step. If it were equal to or less efficient, you will not make up the
gap.

That's not a proof -- it's an observation of reality, right?

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.

At any rate, the bottom line is you can't execute 100 instructions
faster than 50 instructions if they're running on average the same
number of clock cycles -- until someone invents a CPU with an ALU that
executes intermediate code directly, cycles have to be used by the
interpreter to transform to the native binary.

I used to program in Lisp years ago it had similiar issues. Don't hold
me to it, but if I remember right there was a movement by Lisp
aficionados to create a CPU that did exactly that: executed Lisp
directly. These machines obviously never gained a lot of popularity.

There's a beauty in interpreted languages, but instruction-level
efficiency is a trade off you make for the functionality and late-
binding paradigm that interpretation provides. I give the JVM
architects a lot of credit, as under the right circumstances they
glean a lot of efficiency out of Java byte code -- but on balance the
Java code I've worked with in batch, GUI, and web server applications
has not been impressive from a speed standpoint. Functionality wise
it's great, however, so that's the emphasis upon which one should
focus with respect to interp. languages, IMHO.


.



Relevant Pages

  • JNI works with gij but not java
    ... Here are the symptoms of a problem I'm facing. ... all the symptoms seem to point to the Sun Java interpreter ... Java class is executed using the 'gij' interpreter isntead of Sun's ... and executing everything nicely... ...
    (comp.lang.java.programmer)
  • JNi works with gij but not java!?
    ... Here are the symptoms of a problem I'm facing. ... all the symptoms seem to point to the Sun Java interpreter ... Java class is executed using the 'gij' interpreter isntead of Sun's ... and executing everything nicely... ...
    (comp.lang.java.developer)
  • Re: Ein Python-Bytecode-Interpreter
    ... Python bauen. ... Wenn man hier zum Beispiel von einem Servlet pro Thread ausgeht und am Ende des Servlets dein Pythonprogramm steht, dann kann man eher mit einem Interpreter pro Thread arbeiten, der auch fast gar keinen Javacode alleine aufrufen müsste. ... Immerhin musst du auf diese Art überlegen wie die beliebige Objekte in Java auf Python mapst... ... class PyString extends PyValue { ...
    (de.comp.lang.java)
  • Re: Rowlys wit and wisdom on the MOS 6502 vs Zilog Z80
    ... T h ë M u n t d r ë g g ë r wrote: ... Is that still failing performance targets by huge factors, ... It is compiled into 'bytecode' which is then interpreted by the java virtual machine. ... windows is vbscript which is a vb/vba alike interpreter. ...
    (uk.people.support.depression)
  • ADSL permanent cable connection failure after automatic on-line update
    ... SuSEfirewall2: Warning: ip6tables does not support state matching. ... Executing /sbin/conf.d/SuSEconfig.fonts... ... cannot find a sans serif Japanese font. ... Japanese in Java ...
    (alt.os.linux.suse)