This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: input line is too long
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: Erik Poupaert <erik dot poupaert at chello dot be>, <java at gcc dot gnu dot org>
- Date: Mon, 23 Dec 2002 12:07:12 -0500 (EST)
- Subject: Re: input line is too long
On Sun, 22 Dec 2002, Per Bothner wrote:
> Erik Poupaert wrote:
> > Another bizar thing: Jikes compiles sources about a 100 times faster than
> > GCJ. Admitted that GCJ does a bit more work, but not a hundred times!
>
> It would be really helpful if someone could profile GCJ, so we could
> have an understanding of where the time is going. Is it slow because
> it needs to do a lot of work, or are there places where we're doing
> something dumb (like an N^2 algorithm) that can be relatively
> easily fixed?
The frontend is much faster reading .class files than parsing .java
sources right now. It's obvious if you observe the initial building of
java.lang in libjava: gcj -C is slow up until it compiles
java.lang.Throwable, but very fast afterwards.
I'm not sure if it's the cost of building trees for whole classes or the
overhead of a bison-generated parser, but I'd bet on the latter.
Table-driven parsers just don't perform well on modern systems.
Jeff