Proplists are just lists of tuples, so finding keys is linear.

You can convert lists to dict (http://www.erlang.org/doc/man/dict.html) and 
back again, but whether this will matter in a map function will require 
benchmarking. I’m really doubtful though, the cost of the conversion is surely 
higher than the gain.

B.

On 27 Feb 2014, at 09:50, Stanley Iriele <[email protected]> wrote:

> Basically my case is that I may have a doc with hundreds of keys
> potentially and was curious about the behavior
> 
> 
> On Thu, Feb 27, 2014 at 1:12 AM, Stanley Iriele <[email protected]>wrote:
> 
>> I'm fairly new to erlang and I am going through the docs couchdb docs
>> again and its shows that proplists are the way objects documents are stored
>> when you interact with them in an map function (or whatever other function).
>> 
>> My question is...from what I have read proplists have linear performance
>> and are not like a dictionary so when fetching a key...its actually linear
>> not O(1). Am i misunderstanding something something about erlang?...is
>> there a map like structure in Erlang or something?. Anyways,,any clarity on
>> this matter would be greatly appreciated
>> 

Reply via email to