🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.st80
Article #299

Smalltalk efficiency (was: Typed Smalltalk)

#299
From: psc
Date: Fri, 18 Jul 1986 22:04
43 lines
2915 bytes
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.
Technical Details
Message-ID: <580@lzaz.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utcs!mnetor!seismo!gatech!cuae2!ihnp4!lzaz!psc
References: <799@cit-vax.Caltech.Edu> <7815@watdaisy.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utcs!mnetor!seismo!gatech!cuae2!ihnp4!lzaz!psc
From: psc@lzaz.UUCP
Newsgroups: net.lang.st80
Subject: Smalltalk efficiency (was: Typed Smalltalk)
Message-ID: <580@lzaz.UUCP>
Date: Fri, 18-Jul-86 18:04:47 EDT
Article-I.D.: lzaz.580
Posted: Fri Jul 18 18:04:47 1986
Date-Received: Sat, 19-Jul-86 22:24:38 EDT
References: <799@cit-vax.Caltech.Edu> <7815@watdaisy.UUCP>
Organization: AT&T Transaction Services, Lincroft NJ
Lines: 43