cache in a VM

Jecel Assumpcao Jr jecel at merlintec.com
Sun Nov 25 17:48:18 UTC 2001


On Saturday 24 November 2001 20:29, Dan Ingalls wrote:
> Hey, Tim, go easy on the guy.  It saves space.
> The first *decade* of Squeak's lineage was 16-bit pointers.

Indeed. 32K non integer objects are more than enough for many embedded 
applications. Even Squeak 1.16 had little more than this: 36K objects. 
Squeak 3.1 has ten times as much, but can hardly be considered a 
"light" environment.

I am doing a 16 bit VM and am quite happy with it. Since it is closer 
to Forth than to Smalltalk I won't go into details here.

> But why not get adventurous and use 8 bits to encode a pointer or an
> integer.  You'll need to use extended precision more often, but
> you'll have learned something by the time you're done.

The first Smalltalk VM I designed (1984) had 5 bit pointers/integers. 
Actually, it was 4 data bits and 1 "last nibble" bit for variable 
length pointers. I did learn a lot, in particular why the HP41 
calculator (my inspiration for this) was so slooooow.

> Maybe you could blow it into an FPGA.

Exactly what I am doing. A Xilinx Spartan II 15 only costs $7 and is 
enough for a tiny but relatively high performance VM. Tim is quite 
right about having an indirection on every memory access (object table) 
being a very bad idea. But you only have to put up with this if you use 
a normal CPU. When you roll your own, you can have a virtually 
addressed OO cache like the Mushroom and then the indirection only 
slows downs cache misses, not every access.

> Just kidding.
>
> Not

Me neither. We live in interesting times, so let's have some fun!

-- Jecel





More information about the Squeak-dev mailing list