Quick Optimization Question
Andrew Haley
aph@redhat.com
Wed Mar 28 16:23:00 GMT 2007
Mohan Embar writes:
> Hi All,
>
> Sorry if the answer to this is obvious, but I figured
> someone (Andrew) would know this off the top of his
> head.
>
> If I do this:
>
> public static final byte[] FOO = new byte[] {....};
>
> ...will gcj know to translate FOO.length into
> a constant at compile time?
There is some code in the compiler to do this particular optimization,
but I'm not sure it works in all cases.
Andrew.
--
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom.
Registered in England and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland)
More information about the Java
mailing list