Re: suggestion wanted for Java compiler evaluation



<clemenr@xxxxxxxxxx> wrote
> <victor_york@xxxxxxxxx> wrote
> > hello, everyone,
> > recently, I worked on a open source Java compiler project. After my
> > work, I wanna evaluate the compiler with some benchmark tools and
> > compare it with other popular Java compilers. could anyone give some
> > information about that?
> > thanks in advance
>
> How about my Java program for simulating the speciation and evolution
> of cichlid fish in the East African rift lakes. It's all in Java,
> fairly large (19,000 lines of java in the directory but not all of that
> is the program), and does massive amounts of work. If you could make it
> run faster than it does with Sun's java interpreter, then that would be
> an advantage to me, and I would do the benchmark tests for you.

I'm assuming your compiler takes a program written in the Java
programming language and outputs class files.

Because of the nature of the Java platform, it probably makes more
sense for your compiler to optimize for size than for speed. The
reason being that a lot of the optimization depends entirely on the
architecture of the system the program is running on. That's something
your compiler doesn't know (but a VM would, and which is why most of
the optimization should be done by the VM and associated
JIT-compilers).

Besides, the main way to optimize for size is to put less bytecode
instructions in the class file, and less instructions to execute
(usually) has a side effect of being faster anyway.

Also, measuring size the class file is relatively easy and
deterministic (as opposed to measuring speed). You may need to get a
class file disassembler; you want to count number of instructions,
rather than the number of bytes a class file takes up. If you want,
you can also assign different scores to instructions (make jump
instructions or invoke instructions more expensive than bitwise
comparison instructions, for example) to reflect the probable speeds
they'll run at on an actual CPU.

For this task, you can probably download just about any other open
source Java program (there are lots out there), and just try to
compile them and see how small you can make your files.

BTW, it's not hard to beat Sun's javac compiler; I wrote a java
compiler back in university which was significantly more optimized
(both in terms of size and speed) over the poor way in which javac
handled string concatenation, for example.

- Oliver
.



Relevant Pages

  • Re: Cpp Considered Harmful
    ... >> programming language, the compiler, the IDE, the libraries, etc. ... source file, the implementation shall locate the declaration, (and ... to name one of the defining source files on the command line that initiates ... The counterpart to this in Java is accomplished using the following: ...
    (comp.lang.cpp)
  • Re: wie Array für statische Methoden
    ... > auf gar keinen Fall Java empfehlen;) ... Ich hab mal mit virtuellen Methoden auf einem Microkontroller experimentiert und bin zu dem Schluss gekommen: ... > Es ist ja gerade der Vorteil bei Java einen Compiler ... > Dinge zu optimieren, ...
    (de.comp.lang.java)
  • Re: What is the fastest method of parsing scheme?
    ... These issues can be eliminated by the use of custom memory allocators ... Any other ideas why Scheme would be faster than C++ and Java for heap ... For example, in my compiler, the procedure ) ...
    (comp.lang.scheme)
  • Re: C to Java Byte Code
    ... > Java) cannot do, and you cannot write a compliant Java engine that can ... "I think you would agree with me that a C compiler that directly ... compliant ANSI C compiler are described in MPC's product description." ... these "minor differences" include this requirement: ...
    (comp.programming)
  • Re: Java is slow!
    ... Do you really think Java event dispatcher is where all those CPU cycles ... AMD or Intel wins? ... The current AMD design seems to be simpler, so a compiler writer ...
    (comp.lang.java.advocacy)