This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: big project ported
- To: Anthony Green <green at cygnus dot com>
- Subject: Re: big project ported
- From: Jeff Sturm <jsturm at sigma6 dot com>
- Date: Thu, 21 Oct 1999 14:43:16 -0400
- CC: ashe at boulder dot qms dot com, java-discuss at sourceware dot cygnus dot com
- Organization: AppNet
- References: <199910202332.QAA28560@fencer.cygnus.com>
Anthony Green wrote:
> - I believe Jeff Sturm hacked the gc code to start off with a larger
> heap size and that made a big difference for him. Now that we have
> system properties working, we should make a property for initializing
> this. Jeff, can you offer some guidance here?
Depending on how you use the heap, a larger initial heap can make a
difference, especially to avoid frequent collection. I hacked in a call
to GC_expand_hp() in libjava/boehm.cc (_Jv_InitGC). I used a
environment variable to set the initial size, but a Java property would
probably be more appropriate, especially now that we have compiler
support for properties.
Some GC profiling code would also be a great addition, to measure the
frequency and duration of GC, among other things... I don't know if such
a thing exists for the boehm collector.
> - I'm guess your app does lots of array accesses. We have sub-optimal
> runtime checking code, and the compiler is still not so smart about
> automatically removing array checks. If you're code is ready,
> and it doesn't rely on them, try compiling with --no-bounds-check.
Also, for object arrays, type checking is inefficient. This was
discussed a while back, in the ShellSort thread (I think). Under some
circumstances the compiler can optimize away the test. The ShellSort
program ran about 4x faster simply changing the Double[] array to an
Object[] array, IIRC...
--
Jeff Sturm
jsturm@sigma6.com