>>> 
>>> - Your mySleep won't actually do what you think it does. The entire method 
>>> can be optimized away to nothing after inking at the call site by the JIT 
>>> once the calls to it actually warm up enough, since it has no side effects 
>>> and nothing is done with its return code.
>> 
>> Well, this won’t happen in OpenJDK because of the return value.
> 
> The return value "saves" you only as long as the method doesn't get inlined. 
> After it is inlined, the fact that the return value isn't used allows the JIT 
> to kill the entire code…

You’d think but not in my experience.

Regards,
Kirk

-- 
You received this message because you are subscribed to the Google Groups 
"mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to