[antlr-interest] GCJ

Robert Colquhoun rjc at trump.net.au
Fri Jul 11 06:47:49 PDT 2003


At 12:29 PM 11/07/2003 +0200, Ric Klaren wrote:
>Hey,
>
>On Fri, Jul 11, 2003 at 07:11:27PM +1000, Robert Colquhoun wrote:
> > Had to do some hacking to the antlr sources to get it working and remove
> > the debug classes from the jar.
> >
> > Will follow up with a patch if anybody wants.
>
>I'd be interested. If I can incorporate this in my configure build, then
>we'd soon see an antlr RPM for redhat 9. Which gcc version are you using btw?

I need to fix the patch up first, gjc complained about some synchronization 
in the antlr.collections.impl classes, i went overboard and removed the 
Vector and Stack classes and replaced with java.util versions...

-sh-2.05b$ ls -l antlr.jar a.out
-rw-r--r--    1 rjc      users      358680 Jul 11 18:42 antlr.jar
-rwxr-xr-x    1 rjc      users     2570901 Jul 11 18:43 a.out
-sh-2.05b$ ldd a.out
         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4001f000)
         libgcj.so.3 => /usr/lib/libgcj.so.3 (0x40027000)
         libm.so.6 => /lib/libm.so.6 (0x4060a000)
         libpthread.so.0 => /lib/libpthread.so.0 (0x4062b000)
         libz.so.1 => /usr/lib/libz.so.1 (0x4067c000)
         libdl.so.2 => /lib/libdl.so.2 (0x4068b000)
         libc.so.6 => /lib/libc.so.6 (0x4068e000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
-sh-2.05b$ gcj --version
gcj (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

You pay quite a size penalty with the  gcj version - 2.6mb and you also 
might need to ship gcj.so which weighs in around 6mb.....compared to 
shipping 360k for antlr.jar and the 5mb java 1.3 runtime.

On the grammar i tried ~5k lines the antlr.Tool gcj executable was about 
50% faster....i think the time difference is mainly jvm startup ie if your 
jvm is already running ie with an ant build the times even out.

  - Robert


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list