$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Stefan Slapeta (stefan_at_[hidden])
Date: 2004-09-08 03:17:20
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