[erlang-questions] '--' BIF to be used with caution?

Bjorn Gustavsson bgustavsson@REDACTED
Thu Feb 5 08:36:36 CET 2009


On Thu, Feb 5, 2009 at 1:38 AM, Richard O'Keefe <ok@REDACTED> wrote:
> L1 -- L2
> *could* be implemented to run in O(|L1| + |L2|) (expected) time,
> by building a hash table from L2, then walking over L1.

Yes, we might do that one day.

> If that's not done (for sufficiently large inputs, anyway),
> it's a performance disaster waiting to happen,
> and we'd probably be better off without it.

Yes, we would be better without it, but it has been there since the R1 release,
so it is a little bit late to remove it now.

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list