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) |
[6 later articles] |
From: | Patryk Zadarnowski <patrykz@ilion.eu.org> |
Newsgroups: | comp.compilers |
Date: | 16 Apr 2000 20:05:13 -0400 |
Organization: | Compilers Central |
References: | 00-04-125 |
Keywords: | Java, performance |
> Standing almost at the beginning of a C tool chain (compiler,
> assembler, linker/loader and debugger) project, I'm eager to
> hear your comments & opinions on using Java. The following
> issues are having my current attention:
>
> A. Performance compared to a compiler written in C/C++.
> (And, what do you think of doing a processor simulator
> in Java?)
On the topic of a processor simulator in Java, I can give you fairly
accurate empirical results: I've just completed a fairly large ISA
(MIPS32/MIPS64) simulator written in ISO C++, to replace a MIPS32
simulator written in Java and used in our Operating Systems course
(University of New South Wales). Even without doing just-in-time
translation of MIPS machine code to the target architecture, the
speed-up was over 30 times. Unlike the Java simulator, my C++
simulator does some substential runtime checking. If our OS students
are a representative sample, I can tell you one thing for sure: by
staying clear of Java for processor simulation you're save yourself a
lot of grief and customer support calls in the long run.
I think the moral of the story is that Java isn't well suited for
CPU-intensive (esp. bit manipulation-intensive) applications that do
99% of work in a single tight but large loop with longjumps all over
the place (to handle exceptions and interrupts.) My guess is that,
even with JIT JVM, the performance is killed by the required bounds
checking on the register file.
Patryk.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Patryk Zadarnowski University of New South Wales
<pat@ia64.org> School of Computer Science and Engineering
Return to the
comp.compilers page.
Search the
comp.compilers archives again.