account = Map.new
|> Map.put(:os, os)
|> Map.put(:hwId, hwId)
|> Map.put(:custId, custId)
|> Map.put(:userId, userId)
|> Map.put(:deviceTokens, deviceTokens)
vs
account = %{
:userId => userId,
:devices => devices,
:transId => transId,
:workstation => workstation,
:ip => ip,
:expiration => expiration
}
I figured, since every thing is immutable, first approach involve lots of copying data. So will the second one be better than the first one. Or does the compile do some sought of optimization to make them the same.






















