[erlang-questions] case or clause
Fri Jan 9 00:23:53 CET 2009
2009/1/8 Sten Kvamme <sten@REDACTED>
> Ok, and if I'm using several clauses, is it like it is in Prolog a good
> idea to put the clauses that match most often at the top?
It will never hurt but in many cases it will not help. The compiler is
pretty good at optimising matching and will reorder clauses if it feels the
result is better and the sequential matching semantics is preserved.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions