[erlang-questions] naive execution of guards

Thomas Lindgren <>
Tue Dec 12 19:35:07 CET 2006


--- "Ulf Wiger (TN/EAB)" <>
wrote:

> 
> I was curious to see whether the compiler would
> optimize away repeated
> use of the length/1 guard, e.g in the following
> code:
...
> I'm sure it's tricky, and I don't know if the above
> reasons are strong
> enough.

Actually, this optimization is ordinary elimination of
common subexpressions, and so should be relatively
straightforward to implement.

Best,
Thomas



 
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com



More information about the erlang-questions mailing list