psc@lzaz.UUCP (07/19/86)
In article <7815@watdaisy.UUCP>, lmpopp@watdaisy.UUCP writes: > For example, method lookup is responsible for a lot of overhead in the > Smalltalk bytecode interpreter (at least in some implementations). Actually, the way I read the green book (". . . Bits of Advice"), the most significant bottleneck was allocating local variables; what a systems implementation language (SIL) would do by grabbing some more off the stack. Alas, Smalltalk-80 requires a "spaghetti stack" because of the way it handles multiple processes, and it implements that by allocating locals off the heap (one at a time!) > If the > classes of objects are known at compile time, then the method lookup can be > replaced by a simple procedure call. And think about how much time would be > saved if SmallInteger arithmetic could be coded inline, using the CPU's > built-in arithmetic instructions rather than message sends. > > Len Popp, {allegra,decvax,ihnp4,tektronix,ubc-vision}!watmath!watdaisy!lmpopp Right on! C++ does most "message choosing" statically at compile time. Some "variant" messages can only be chosen at run time; each variable has (somewhat magically) a pointer to an array of functions to call. No table lookup, just an array access. I haven't programmed in Smalltalk (yet; Smalltalk/V from Digitalk is only $100, and takes advantage of very high res on my AT&T PC 6300!) Even so, I'm glad I learned the language. It's had an important effect on how I write C programs, and gave me a good background so I'll be able to write C++ programs "right", if I ever use that language. Gee; maybe Borland could make a "Turbo Smalltalk", incompatible with true Smalltalk-80 (no smiley!), but efficient enough for systems implementation and safe enough for teaching. That'd be *nice*! Until then, maybe Smalltalk/V. (No, I don't have more information, and they don't have brochures yet. Try calling them at 213-645-1082. If anyone has this, *please* post comments to this group and net.micro.pc, okay?) -- -Paul S. R. Chisholm, UUCP {ihnp4,cbosgd,pegasus,mtgzz}!lznv!psc AT&T Mail !psrchisholm, Internet mtgzz!lznv!psc@topaz.rutgers.edu The above opinions may not be shared by any telecomm company. AT&T Transaction Services - the right choice for point-of-sale networking.