This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: I can make your gcj-compiled binaries much smaller.
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> Static references are a preferred method, if only on
Andrew> efficiency grounds.
Andrew> static {
Andrew> try {
Andrew> resourceBundleClass = Class.forName("java.util.ResourceBundle");
Andrew> is harder to understand than a simple
Andrew> ResourceBundle.class
I agree the latter is clearer. And for gcj it is definitely more
efficient, since it is just a symbol reference.
For bytecode, though, the former may be more efficient, since you can
cache the result. I think that the hidden method used to implement
`foo.class' doesn't cache.
This is one of those places where libgcj and more traditional VMs may
have differing goals.
Tom