[squeak-dev] Is DNU cached?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Is DNU cached?

Sophie424
If
    obj foobar.
looksup #foobar and fails with DNU, will the next
    obj foobar
repeat the foobar, or is the DNU cached so no repeat lookup (unless cache
invalidated)?

Is it likely to be the same in e.g. Gemstone ST?

Thanks - Sophie




Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Is DNU cached?

Bert Freudenberg

On 04.05.2008, at 21:39, itsme213 wrote:

> If
>    obj foobar.
> looksup #foobar and fails with DNU, will the next
>    obj foobar
> repeat the foobar, or is the DNU cached so no repeat lookup (unless  
> cache
> invalidated)?

It is not cached in Squeak.

> Is it likely to be the same in e.g. Gemstone ST?


In general, even if it was "cached", you should be unable to tell.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Is DNU cached?

johnmci
In reply to this post by Sophie424
10 years back I got trapped in a snow storm in Boston, and spent the  
evening exploring the existing caching algorithm for method lookup
which hasn't changed much over the years. I was curious if the  
behavior now (well 10 years back)  was the same as what was documented  
in the Green Book,
and how Morphic affected things.  I found no real difference between  
my numbers and the documented Green Book numbers, so working on the
caching won't buy much.

But, I note you would notice it if you turned caching off.

On May 4, 2008, at 12:39 PM, itsme213 wrote:

> If
>    obj foobar.
> looksup #foobar and fails with DNU, will the next
>    obj foobar
> repeat the foobar, or is the DNU cached so no repeat lookup (unless  
> cache
> invalidated)?
>
> Is it likely to be the same in e.g. Gemstone ST?
>
> Thanks - Sophie
>
>
>
>

--
=
=
=
========================================================================
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
=
=
=
========================================================================



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Is DNU cached?

hernan.wilkinson
In reply to this post by Sophie424
Hi Sophie,
 the DNU is cached in the global lookup cache, but not used unless you explicitly send a #doesNotUnderstand: message. (ie: 1 doesNotUnderstand: ....)
 I sent a fix to the list four years ago but it never went to the VM code. The mail is: http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-December/086322.html

 Bye,
 Hernan.

On Sun, May 4, 2008 at 4:39 PM, itsme213 <[hidden email]> wrote:
If
   obj foobar.
looksup #foobar and fails with DNU, will the next
   obj foobar
repeat the foobar, or is the DNU cached so no repeat lookup (unless cache
invalidated)?

Is it likely to be the same in e.g. Gemstone ST?

Thanks - Sophie