Recursion

Bjorn Gustavsson bjorn@REDACTED
Wed Jul 17 10:14:10 CEST 2002


"Fredrik Linder" <fredrik.linder@REDACTED> writes:

> 
> > Also:
> > You order the clauses differently (than Thomas) for the non-tail
> > recursive version. Which is to preferable? My guess was that placing
> > the  zip([],[])->[]  last was best.
> 
> I think so too ;-) Maybe it no longer matters due to hopefully better
> implementation of Erlang, but earlier I think it did. So placing the clauses
> executed only once last could be a good micro-optimization.

The order no longer makes any difference. The compiler reorders the clauses
anyway.

/Bjorn
-- 
Björn Gustavsson            Ericsson Utvecklings AB
bjorn@REDACTED      ÄT2/UAB/F/P
			    BOX 1505
+46 8 727 56 87 	    125 25 Älvsjö



More information about the erlang-questions mailing list