Re: Is Java useful for writing (C/C++) compiler

Peter Bertelsen <pmb@dina.kvl.dk>
17 Apr 2000 11:24:31 -0400

          From comp.compilers

Related articles
Is Java useful for writing (C/C++) compiler vdbent@mail.com (Kees & Annette van der Bent) (2000-04-16)
Re: Is Java useful for writing (C/C++) compiler patrykz@ilion.eu.org (Patryk Zadarnowski) (2000-04-16)
Re: Is Java useful for writing (C/C++) compiler rsherry@home.com (Robert Sherry) (2000-04-17)
Re: Is Java useful for writing (C/C++) compiler pmb@dina.kvl.dk (Peter Bertelsen) (2000-04-17)
Re: Is Java useful for writing (C/C++) compiler gram@ull.mjolner.dk (Flemming Gram Christensen) (2000-04-20)
Re: Is Java useful for writing (C/C++) compiler iank@bearcave.com (2000-04-20)
Re: Is Java useful for writing (C/C++) compiler jandk@easynet.co.uk (Jonathan Barker) (2000-04-20)
Re: Is Java useful for writing (C/C++) compiler dale@cs.rmit.edu.au (dale) (2000-04-21)
Re: Is Java useful for writing (C/C++) compiler dvdeug@x8b4e53cd.dhcp.okstate.edu (2000-04-21)
Re: Is Java useful for writing (C/C++) compiler nr@labrador.eecs.harvard.edu (2000-04-25)
[4 later articles]
| List of all articles for this month |
From: Peter Bertelsen <pmb@dina.kvl.dk>
Newsgroups: comp.compilers
Date: 17 Apr 2000 11:24:31 -0400
Organization: KVL
References: 00-04-125 00-04-128
Keywords: Java, performance, practice

Patryk Zadarnowski wrote:
>
> ... by staying clear of Java for processor simulation you're save
> yourself a lot of grief and customer support calls in the long run.


Either language has its advantages: C++ programs might be faster, Java
programs will in general be safer (due to automatic memory management
and various dynamic checks).


> I think the moral of the story is that Java isn't well suited for
> CPU-intensive (esp. bit manipulation-intensive) applications ...


This is not a problem with the Java language itself, but possibly
related to the implementation you've been using.


> ... that do 99% of work in a single tight but large loop with
> longjumps all over the place (to handle exceptions and interrupts.)


What do longjumps have to do with Java? Java directly supports
exceptions, e.g. for handling arithmetic errors.


> My guess is that, even with JIT JVM, the performance is killed by
> the required bounds checking on the register file.


Assuming that your 'register file' is implemented as an array of fixed
size, such bounds checking could be eliminated in an optimizing JVM or
ahead-of-time compiler (producing native code).


--
Peter Bertelsen (http://www.dina.kvl.dk/~pmb)
PhD student, KVL, Copenhagen


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.