[erlang-questions] The is_record() guard
Tue Jul 28 09:07:26 CEST 2009
On Sat, Jul 25, 2009 at 10:39 PM, Steve
> Hi Bjorn,
> Definitely the approach suggested by Oscar shows much better numbers in
> I also see other cases where functions that filter arguments using guards
> appear to be (quite a bit) less efficient than direct matches on the
> Would it be fair to say that, where possible. pattern matching function
> arguments is in general more efficient than using guards?
There is a section in the Efficiency Guide
that gives some insight into why guards may be inefficient (and also
shows an example where pattern matching without guards also
can be inefficient).
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions