This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
start-up time
- From: Per Bothner <per at bothner dot com>
- To: java at gcc dot gnu dot org
- Date: Wed, 20 Dec 2006 12:54:32 -0800
- Subject: start-up time
A little experiment, running and timing this command:
$KAWA -e '(define (hello s) (display s) (newline)) (hello "Hello!")'
This is basically "hello world", but it also compiles a function and
then calls it, which requires a fair bit of Kawa to get started.
With different values of $KAWA:
(1) java version "1.4.2_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b06)
Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)
Time: about 1s, whether using a .jar or .class files.
java version "1.5.0_05" is about the same.
(2) gij (GNU libgcj) version 4.1.1 20061011 (Red Hat 4.1.1-30)
Time: actually slightly faster, about 0.9s.
(3) gcj-compiled Kawa, with -findirect-dispatch, and installed into a
temporary location (i.e. without libtool indirection).
Time: about 5s. Ouch.
(4) /usr/bin/kawa (older version of Kawa) installed from the Fedora
Extras rpm:
Time: about 0.45s.
(5) gcj-compiled kawa, then running running sudo gcj-dbtool,
followed by gij -jar
Time: about 0.5s. (The difference between (4) and (5) is probably
not significant, and could be because of different Kawa versions.)
So gcj-dbtool seems to be dong some extra magic besides just entering
the jar/so in a database. Some kind of pre-linking?
Anyway, I thought this was instructive.
I'm thinking the right thing for Kawa's 'make install' is after
copying the .jar and .so to their target locations, try to run
gcj-dbtool. That means checking that gcj-dbtool exists and also that
the database is writable (i.e.: test -w `gcj-dbtool -p`).
Does that sound reasonable?
Or does the Fedora aot-compile script do anything else I should do?
--
--Per Bothner
per@bothner.com http://per.bothner.com/