Gentoo Archives: gentoo-java

From: Hanno Meyer-Thurow <h.mth@×××.de>
To: Karl Trygve Kalleberg <karltk@g.o>
Cc: gentoo-java@l.g.o
Subject: Re: [gentoo-java] work on gcj for gentoo
Date: Tue, 21 Feb 2006 18:13:24
Message-Id: 20060221191443.ce7e9f11.h.mth@web.de
In Reply to: Re: [gentoo-java] work on gcj for gentoo by Karl Trygve Kalleberg
1 On Tue, 21 Feb 2006 16:42:51 +0100
2 Karl Trygve Kalleberg <karltk@g.o> wrote:
3
4 > Excellent! We need all the help we can get.
5
6 Whatever I can do.
7
8 > > ... Then use gcj to create native
9 > > executables or libraries out of that jar files. Creating a database
10 > > via gcj-dbtool for jar / native code resolution. If possible Java to
11 > > native.
12 >
13 > The problem with this approach is your resulting programs will be
14 > potentially rather slow.
15
16 I got an example from OOo for jar to native compilation.
17 It may not be lightening-fast but ...
18
19 http://www.openoffice.org/issues/show_bug.cgi?id=54692
20
21 ... there it still speeds up the process.
22
23 What is done there:
24
25 * jars -> native libraries
26 * .java -> native binaray
27
28 What used to do a JVM with jars now does a native binary with jars
29 compiled to native libs. Time went down from 3h40 to 2h45.
30
31 I hit a oom-killer feature of gij - run as JVM - there on my 512MB ram
32 testbox. If you compile that Java source to native that oom-kill
33 vanishes.
34
35 Still, just an example.
36
37 > While gcj can indeed compile .class files (inside .jars) to binary, I've
38 > been told it can produce the most efficient of results. The source code
39 > is much richer in structure than the bytecode, and opens up for many
40 > effective optimizations which could only be reached through
41 > "idiom-recognition" (which doesn't exist for gcj yet, afaik) of the
42 > .class files.
43
44 In a perfect world ... ;)
45
46 > I suspect that you shouldn't give up on using gcj as a source compiler
47 > quite yet. This story may evolve with the whole ecj/gcjx/GPLv3 debate.
48
49 I use gcj successfully on my testbox.
50 As far as it is possible. And with ecj as bytecompiler all my ugly hacks will
51 be a part of the past.
52
53 Only trouble I have actually is eclipse-sdk. Another oom-killer at runtime.
54 May be I find the time to get it to native code somehow.
55
56
57 Regards,
58 Hanno
59 --
60 gentoo-java@g.o mailing list

Replies

Subject Author
Re: [gentoo-java] work on gcj for gentoo Karl Trygve Kalleberg <karltk@g.o>