Boost logo

Boost :

From: troy d. straszheim (troy_at_[hidden])
Date: 2004-09-08 06:37:28


compressed_vector<> from boost::numeric::ublas could be appropriate...
don't get much of a sense of how much from the original post. It is
implemented with two vectors, one of indices and one of values.

-t

On Sep 8, 2004, at 10:17 AM, Stefan Slapeta wrote:

> David B. Held wrote:
>
>> I'm not so sure speed is the issue vs. size. Your typical std::map<>
>> implementation will take about 3 pointers + int + sizeof(data) per
>> node,
>> whereas std::vector<> typically only has whole-container overhead.
>> Unless your nodes are extremely large, that's not an insignificant
>> amount of space overhead if you are only going to insert once.
>
> Yes. Furthermore, a default constructed vector is usually small and
> cheap, a map isn't (there is always at least one node instantiated).
>
> Stefan
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk