Optimizing Squeak

George Bosworth georgeb at microsoft.com
Thu Feb 25 02:02:23 UTC 1999



<johnm at wdi.disney.com> wrote:
>Note that part of Smalltalk/V's impressive speed for a simple interpreter
was
>based on a carefully designed bytecode set. I've never been able to find
out
>much about this bytecode set. It may be that Digitalk considered it trade
secret,
>which would explain why they hid the compiler classes from the user.

John,

Smalltalk/V (actually Methods since it predates Smalltalk/V and shares the
same engine) did two things 1.) the byte codes were carefully picked to
match the 8088 and were relatively few in number. 2.) The byte codes were
the byte offset from the table base address directly rather than an index
into a jump table, i.e. the byte codes were implemented in-line in the table
(hence the need for a small number of bytecodes).  This meant that a byte
code dispatch was reduced to loading a byte into AL and then doing a JMP
AX+tablebase.  Sort of a direct threaded code scheme, but done in byte, that
was tuned to the specifics of the 8088 instruction set (what a nightmare)

---george bosworth





More information about the Squeak-dev mailing list