I can make your gcj-compiled binaries much smaller.

Tom Tromey tromey@redhat.com
Thu Jan 16 19:43:00 GMT 2003


>>>>> "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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /