[erlang-questions] Best Practice in Map keys: Atoms or Binaries (or Strings)?

Björn-Egil Dahlberg XB bjorn-egil.xb.dahlberg@REDACTED
Mon Oct 3 11:12:24 CEST 2016

On 10/03/2016 11:06 AM, José Valim wrote:
>     Also, for literal keys the hashing is done at *load time* so it
>     will only hash again when it that hash exhausted, typically this
>     will happen if Maps are larger then 50000 pairs.
> Neat. Does this happen only on maps creation or also when updating 
> maps with := or =>? What about matching on maps?

Any get_map_element(s) so matching and lookups with literals for sure. 
We haven't done it for updating or creation but lookups are far more 
common. Also, not for BIFs.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161003/0bb8e0cf/attachment.htm>

More information about the erlang-questions mailing list