Performance of invalidating unused SwitchPoint

Remi Forax forax at univ-mlv.fr
Sat Jan 5 10:37:49 PST 2013


On 01/05/2013 07:19 PM, Charles Oliver Nutter wrote:
> Hello all!
>
> I can accept that invalidating a SwitchPoint that's in use would cause
> some perf impact. But I'm wondering why we'd see the same perf hit for
> invalidating a SwitchPoint that has never been bound. Is there a
> reason for this?
>
> I have a few places in JRuby where I eventually give up on caching
> certain values if they fail too many times, but on the value updating
> side I'm still invalidating SwitchPoints. If they're never actually
> used other than to invalidate, shouldn't invalidating be cheap?

No.
invalidating a SwitchPoint that is JITed cost your an harm,
invalidating a SwitchPoint which is not JITed is just a volatile write 
but you still have to update the callsite to use a new SwitchPoint.

>
> - Charlie

Rémi



More information about the mlvm-dev mailing list