Again, the question is the _display_ of the keys; absolutely nothing would
change about how the keys are stored.
"I propose always sorting the map keys *when they are inspected" *(emphasis
mine).
Please read back to the start of the thread if you care to comment.
On Wednesday, February
Good points, but isn't inspecting a map generally a development time
activity? Especially big maps?
Sometimes, optimizing people is the right thing to do. When you're looking
at big lists of ecto objects and working to pick out an ID, having things
in order is a big deal.
-bt
On Wed, Feb 15,
How do you mean "when they are inspected"? If you do it then all functions
which step through the keys would have to be fixed and some like *fold* and
*map* could be very difficult to implement in an efficient manner. If you
don't do it for all then it is pointless.
Robert
On Monday, 13
If I dump a map to logs I don't care about its order, I only want it to be as
fast as possible. Logging already introduces a serious performance hit, and
sorting would make logging even more expensive performance wise.
As was mentioned previously if a map is small it's already sorted. So it
Before jumping on this should we be asking why the decision was made to not
sort if there are more than 32 keys? Maybe there is a performance concern,
and if we want sorted keys we should be sending a different message?
Amos King
Owner
Binary Noggin
http://binarynoggin.com #business
Hey Amos
As I understand it the ordering of maps is an Erlang implementation detail
that is not to be relied upon. If you want an ordered dictionary a map
probably is not the correct data structure for you.
Cheers,
Louis
On Wed, 15 Feb 2017 at 14:35 Amos King wrote:
>