[m-dev.] faster higher order call

Thomas Charles CONWAY conway at cs.mu.oz.au
Tue Jun 24 17:00:09 AEST 1997


Fergus Henderson, you write:
> Peter Schachte, you wrote:
> > Here's the suggestion: change order of arguments for all calls, so that
> > the last input argument goes in r1, the second last in r2, etc.  Then
> > call/N could be implemented [more efficiently].
> 
> In general, I like it.
> 
> However, I suspect that earlier arguments are probably used more often
> than later arguments; for example, code tends to switch on the first
> argument, not the last.  (This style helps readability.)
> Thus, I am a bit worried that reversing the order of argument passing might
> have a significantly detrimental impact on efficiency.

This would only be the case for predicates with more input arguments
than there are real rN registers. Thus, on the alpha, it would be unlikely
to slow down most predicates, and on the x86 it would slow down almost
all predicates. :-(

Thomas
-- 
ZZ:wq!
^X^C
Thomas Conway               				      conway at cs.mu.oz.au
AD DEUM ET VINUM	  			      Every sword has two edges.



More information about the developers mailing list