map and filter with list comprehensions

Bjorn Gustavsson <>
Fri Sep 20 13:58:38 CEST 2002


Håkan Stenholm <> writes:

> If memory serves right, the reason used to be that list comprehension 
> was slower than the recursiv version - this was true in R6 (R5 ?) and 
> earlier, but nowdays there should be no major difference.
> 

Yes, that is correct.

Nowadays lists comprehensions are transformed to a recursive function.

List comprehensions used to be very slow because the were transformed
to a recursive fun, and fun calls too used to be a lot slower than
they are today.

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



More information about the erlang-questions mailing list