On 23/02/2026 16: 52, Michael Stover wrote: > Maybe the if(x. isBound()) return x. get() could be made more performant, public Object isBoundThenGet() { return sl1. isBound() ? sl1. get() : this; } For this test I'm looking at between 2. 8 - 4. 5
On 23/02/2026 16:52, Michael Stover wrote:
> Maybe the if(x.isBound()) return x.get() could be made more performant,

     public Object isBoundThenGet() {
         return sl1.isBound() ? sl1.get() : this;
     }

For this test I'm looking at between 2.8 - 4.5 clock cycles. I don't 
know what could be done to make it much more performant than that.

If you know of any usage pattern that performs badly, I'd like to know.
One thing that might be an issue is that we don't cache failure (i.e. we 
don't save the result of a negative lookup.) That's a design choice, 
because we assume that people won't repeatedly query an unbound scoped 
value. Having said that, it'll probably not be slow unless you have man 
bound scoped values/

Andrew.

Reply via email to