big project ported
Jeff Sturm
jsturm@sigma6.com
Thu Oct 21 11:39:00 GMT 1999
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
More information about the Java
mailing list