Hotspot loves PHP.reboot

Rémi Forax forax at univ-mlv.fr
Tue Sep 6 10:36:56 PDT 2011


On 09/06/2011 05:51 PM, Charles Oliver Nutter wrote:
> On Tue, Sep 6, 2011 at 10:39 AM, Rémi Forax<forax at univ-mlv.fr>  wrote:
>> Yes, but don't forget that PHP.reboot has no overflow check.
> Did we ever figure out if it's possible to trick Hotspot into doing a
> JO instead of the raw bit-level operations? John/Christian/Tom: what
> would it take to get HS to "know" that we're doing an integer
> overflow-after-maths check and do the (faster?) JO?
>
> Rémi: For what it's worth, I did specialize +/- for 1 and 2 in the
> indy-based call protocols to avoid a full overflow check.

If you have specialize for -2/+2, you should reuse exactly the same code 
for +n/-n.
see 
https://code.google.com/p/jsr292-cookbook/source/browse/trunk/binary-operation/src/jsr292/cookbook/binop/RT.java#11

>
> - Charlie

Rémi



More information about the mlvm-dev mailing list