This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]