PROPOSAL: Binary Literals
Mark Thornton
mthornton at optrak.co.uk
Thu Mar 26 06:48:16 PDT 2009
Tim Peierls wrote:
> On Thu, Mar 26, 2009 at 3:42 AM, Derek Foster <vapor1 at teleport.com> wrote:
>
>
>> From: Reinier Zwitserloot <reinier at zwitserloot.com>
>>
>>> The result of a library call is a byte primitive, which you can then
>>> assign to a private static final byte constant. From there on out, that will
>>> be as fast as a code literal.
>>>
>> You are not considering the impact of constant folding on compiler
>> optimizations.
>>
>
>
> This might have been an issue years ago, but modern JVMs can handle this
> kind of thing easily.
>
> --tim
>
>
It is still an issue for JavaME and "case" labels in switch statements.
However the need for binary values in case labels must surely be very
rare. I don't find the processor instruction simulation example to be
very convincing.
Mark Thornton
More information about the coin-dev
mailing list