[erlang-questions] generators/iterators

Damien Morton <>
Mon Jun 18 07:09:23 CEST 2007


Im new to Erlang - so its just that - a guess. But ... when I imagine 
what the machinery for a message send is, compared to what I know the 
machinery for a function call is, at last in broad strokes, if a fun 
call isnt faster, it should be.

The speed is one thing - but I think the more important reason is that 
the fun call subsumes the message receive, that is, the 
generator-as-repeated-fun call can implement receive functionality 
easily if desired, but it would tend to be awkward to do it the other 
way around.
>> I guess calling a fun is much faster than sending messages between 
>> processes.
>>     
>
> Well that'd certainly be a good reason. I don't know that I've seen the
> numbers. I have seen stuff that suggests calling a fun is a bunch slower
> than calling a defined module-member function.
>
>
> --
> [ I love pre-moistened towelettes ] Mike McNally -- 
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>
>   




More information about the erlang-questions mailing list