cache in a VM

Tim Rowledge tim at sumeru.stanford.edu
Sat Nov 24 21:24:23 UTC 2001


Hi Tom,


> The vm I'm working with has a stack, using 16 bits to encode an integer 
> or pointer to an object.
I'm really puzzled why you are working with such a VM; restricting to 16
bit OOPS is really very ancient technology. Is this some old version of
LittleSmalltalk or something? Why not use a more modern system; ie
Squeak ?
> 
> I'm adding a cache.  Addresses on the stack will now be 1/2 as small in 
> bit size, and point to a location in cache.  The cache address will 
> then contain the integer or object pointers.  The VM I'm working with 
> now does not implement this, and I would appreciate any pointers to 
> relevant articles.
I can't find any suitable references for you on this. On the face of it
it is very likely to cause a noticable slowdown on almost any CPU I can
imagine. You are going to add yet another indirection for every object
reference, something that is one of the most crucial activities in a VM.
I'm curious as to the reason you think this will help?

>I didn't quite get a chance to look at all 10,000 pages of the code for 
>the interpreter...
>
>The code I looked at suggested that the the items being pushed onto the 
>stack are not addresses which points a location in a cache?  Is that 
>correct?
>
In every VM I've ever written or studied, the stack contains oops, the
same as any other object. To do otherwise would be to add an extra layer
of cmoplication that could only confuse!

tim

-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
10.0 times 0.1 is hardly ever 1.0.





More information about the Squeak-dev mailing list