Iteration over lists

Robert Virding robert.virding@REDACTED
Fri Mar 17 12:56:28 CET 2006


Ulf Wiger (AL/EAB) skrev:
> 
> Of course one way to view the benchmark is that it
> gives a hint about the overhead of atually constructing
> the list when using list comprehension instead of 
> lists:foreach(). A list comprehension which _didn't_
> built the list and avoided using funs could then be
> significantly faster, right (that is, also faster than
> lists:foreach())?  (:

I think that the list construction time is only significant here because 
  what is actually done is so trivial. :-)

Robert




More information about the erlang-questions mailing list