[erlang-questions] list comprehensions speed

Dmitry Kolesnikov <>
Tue Feb 25 18:46:35 CET 2014


Becase "name3" is not a string. This is a list. string:equals() is made for abstraction to maintain compatibility.

Best Regards,
Dmitry
>-|-|-(*>

> On 25 Feb 2014, at 18:33, Oleg <> wrote:
> 
>> On Tue, Feb 25, 2014 at 04:22:05PM +0200, Dmitry Kolesnikov wrote:
>> Hello,
>> 
>> [ Value || {Name, Value} <- A, Name =:= "name3"].
> 
> If we can use =:= for the string matching, why does string module contain equal()?
> 
>> is faster ;-)
>> 
>> - Dmitry
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list