This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Kill hack in java disabling unit-at-a-time
On Mon, Aug 15, 2005 at 12:59:04PM +0200, Jan Hubicka wrote:
> This is hard to guess without looking into testcases. In general
> keeping bodies around has unavoidable memory costs that are magnified by
> bloatness of our IL, but they don't seem to be that deadly for C/C++
> (and surprisingly even better than non-unit-at-a-time at average because
> we do better on releasing unneded stuff). The fact that almost all
> other compilers does the same seems to suggest that it is manageable.
> Perhaps Java is significantly different, but I need some understanding
> of that first.
I guess the important difference is that unlike C/C++, when compiling
Java people usually build huge .jar files at once, so it is not that
unusual to have 1000-10000 classes compiled at once.
Say watch the memory consumption difference with:
gcj -shared -O2 -fPIC -findirect-dispatch -o /tmp/libgcj-4.1.jar.so /usr/share/java/libgcj-4.1.jar
Jakub