[erlang-questions] case or clause

Robert Virding rvirding@REDACTED
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.

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090109/3f2f3a11/attachment.htm>


More information about the erlang-questions mailing list