[erlang-patches] improved orddict performance

Raimo Niskanen <>
Fri Oct 4 12:19:08 CEST 2013


On Thu, Oct 03, 2013 at 10:27:42PM -0500, Rich Neswold wrote:
> On Thu, Oct 3, 2013 at 7:58 PM, Steve Vinoski <> wrote:
> 
> > OK, Anthony brought up yet another issue with my previous modified
> > orddict, which is that if someone passes an improper list instead of an
> > orddict, the new version acts differently than the old. Since the goal is
> > backwards compatibility with improved performance, I've added a fourth
> > commit that deals with these issues.
> >
> 
> I'm not sure whether this is the backwards compatibility one wants to
> preserve. Usually you want to preserve an API, but in this case you're
> preserving code that manipulates the internal representation of an orddict.
> Any code that uses the orddict API should not end up with an improper list.
> Any code that passes an improper list to orddict should break.

But in the case of orddict, it is actually documented to have a data 
representation being an ordered list of key-value tuples.

Therefore there is a possibility that someone has misused that
knowledge and uses an improper ordered list of key-value tuples,
which may not be violating the documentation...

> 
> -- 
> Rich

> _______________________________________________
> erlang-patches mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-patches


-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


More information about the erlang-patches mailing list