start-up time
Andrew Haley
aph@redhat.com
Thu Dec 21 07:07:00 GMT 2006
Per Bothner writes:
> 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?
No. gcj-dbtool adds a file to a database, that's all. I have no
explanation for (3).
> 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?
That should work.
> Or does the Fedora aot-compile script do anything else I should do?
No, it doesn't.
Andrew.
More information about the Java
mailing list