Chapter Contents |
Previous |
Next |

Further Notes |

The Interactive Matrix Language is an interpretive language executor that can be characterized as follows:

- efficient and inexpensive to compile
- inefficient and expensive for the number of operations executed
- efficient and inexpensive within each operation.

Consider four methods of summing the elements of a matrix:

s=0; /* method 1 */ do i=1 to m; do j=1 to n; s=s+x[i,j]; end; end; s=j[1,m]*x*j[n,1]; /* method 2 */ s=x[+,+]; /* method 3 */ s=sum(x); /* method 4 */Method 1 is the least efficient, method 2 is more efficient, method 3 is more efficient yet, and method 4 is the most efficient. The greatest advantage of using IML is reducing human programming labor.

Chapter Contents |
Previous |
Next |
Top |

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.