vector - to use or not to use....

david wallin david.wallin@REDACTED
Wed Feb 12 18:20:34 CET 2003


On Wed, 2003-02-12 at 07:33, Bjorn Gustavsson wrote:
> The problem with vectors is that they effectively turn off the
> generational garbage collector, so that all live data will be copied
> on every garbage collection.
> 
> That problem makes vectors unsuitable for general use. For some uses,
> vectors are clearly faster than alternative heap-based data structures.
> 

Is this problem likely to stay in future versions of Erlang ?

> There is an implementation of heap sort in the vector.erl module itself.
> 

Well, I was less than clear but what I really wanted was a heap with
insert & extract functions. I'm going to do a lot of insertions and
extractions into the same heap. So I thought speed would be an issue.
But I suppose under these circumstances vector might actually be a bad
choice.

[stuff deleted]

thanks,

--david.

-- 
david wallin <david.wallin@REDACTED>




More information about the erlang-questions mailing list