REDUCE

8.4 Changing the Internal Order of Variables

The internal ordering of variables (more specifically kernels) can have a significant effect on the space and time associated with a calculation. In its default state, REDUCE uses a specific order for this which may vary between sessions. However, it is possible for the user to change this internal order by means of the declaration KORDER. The syntax for this is:

        korder v1,...,vn;

where the Vi are kernels. With this declaration, the Vi are ordered internally ahead of any other kernels in the system. V1 has the highest order, V2 the next highest, and so on. A further call of KORDER replaces a previous one. KORDER NIL; resets the internal order to the system default.

Unlike the ORDER declaration, that has a purely cosmetic effect on the way results are printed, the use of KORDER can have a significant effect on computation time. In critical cases then, the user can experiment with the ordering of the variables used to determine the optimum set for a given problem.