APL (was: Rekursiv)

Jecel Assumpcao Jr jecel at merlintec.com
Fri Oct 4 23:50:55 UTC 2002


On Friday 04 October 2002 19:58, Alan Kay wrote:
> Nice email. I won't enumerate any of the many PARC schemes for
> dealing with fast execution of late bound languages (but consider the
> "giant hash table" ...).

I can do far worse than that :-)  My small machine has 8MB of SDRAM 
since that was the cheapest memory chip around. But for this 
application 2MB or so would probably have been enough. So I use a full 
Selector x Class table for dispatch, even though it takes up 20 times 
more memory than most reasonable approaches. No hash, but this 16 bit 
machine is limited to 32K objects and only 4K selectors (too small for 
Squeak, sorry).

>       But I would like to mention the work of Phil Abrams and others
> at Stanford and elsewhere in the late 60s and early 70s for on the
> fly APL optimizations. They used algebraic manipulations of various
> kinds in a limited HW window to create pretty optimal execution
> streams (e.g. (A*B)[1 to 5] was manipulated into A[1 to 5] * B[1 to
> 5] before execution). There are some very nice generalizations of APL
> ideas and algebras to polymorphic objects, many of which have not
> been exploited as well as they could and should be.

This would be really great for high performance number crunching in 
Smalltalk, as you have mentioned before. This paper looks very 
interesting (you have to be an ACM member to read it, and I am not) and 
has a reference to Phil's 1970 PhD thesis "An APL Machine":

 http://portal.acm.org/citation.cfm?id=801914&dl=ACM&coll=portal

Given the authors, I imagine they concluded that trivial hardware and a 
good compiler were the way to go...

I did get to see some of these kinds of optimizations in SISAL (Streams 
and Iteration in a Single Assignment Language). It is sad to see so 
many programmers doing Fortran style (now C plus assembly to get at MMX 
or whatever their hardware's vector unit is called) coding for 
multimedia and 3D.

-- Jecel



More information about the Squeak-dev mailing list