Go to the first, previous, next, last section, table of contents.

Smart Languages

Typical modern compilers and interpreters aim chiefly for micro-efficiency: They try to execute each subroutine call as quickly as possible at runtime.

This means that the code they produce acts very "dumb", since it does as little reflection as possible about what it is doing.

This is certainly a valid and useful language design approach, but there are times when one would like alternatives.

Suppose, for example, that you are working (as I often do) with MRI datasets averages tens of megabytes in size, where each primitive operation can take seconds or even minutes.

Micro-optimizations shaving a microsecond or two off the call invoking the primitive will help us in this sort of problem domain.

What will help us are macro-optimizations such as noticing that the same expression has been computed recently and the result is still available, or restructuring the expression as a whole to execute fewer primitive calls, or perhaps even compiling custom versions of the primitives that will run faster in the particular case at hand.

A language optimized to this sort of problem domain can afford to sweat blood over each expression as it is interpreted, perhaps searching through the space of algebraically equivalent expressions and applying a cost function to find the cheapest, or even doing trial runs on smaller datasets to find out experimentally which approach is fastest.

Language implementations of this sort are rare today because datasets of this size have been rare: The most prominent examples to date are SQL implementations, which sometimes do these sorts of optimizations.

But with personal computer disk capacities climbing into the tens of gigabytes, gigabit networking becoming common, and multi-CPU chips starting to ship, the need for such languages is going to become widespread and routine.

Muq is a good substrate on which to build such languages both because it can handle gigascale databases, and also because it provides a rich, flexible environment in which to symbolically manipulate code.

(Obviously, this sort of language support has strong affinities to symbolic algebra systems. This is one reason I am interested in seeing symbolic algebra supported in the Muq environment.)

Go to the first, previous, next, last section, table of contents.