Boost logo

Boost :

Subject: Re: [boost] [MultiIndex] Random Access mental model?
From: David Abrahams (dave_at_[hidden])
Date: 2008-11-01 13:48:28


on Sat Nov 01 2008, JOAQUIN M. LOPEZ MUÑOZ <joaquin-AT-tid.es> wrote:

> on Fri Oct 31 2008, David Abrahams <dave-AT-boostpro.com> wrote:
>
>> Actually, MultiIndex could give me *almost* everything I need by
>> threading a singly-linked list through the hash nodes (instead of
>> doubly-linked). That's enough for a FIFO queue.
>
> You can do that with Boost.Intrusive, and that will indeed save you
> one pointer per node as compared with the Boost.MultiIndex-based
> solution. If you're resorting to manually combining a hash_map and
> a slist<pointer> then you'd begaining nothing, as in the hash_map+
> deque<pointer> case described in my previous post.

No, the deque saves a lot of memory. The slist would indeed gain
nothing as you do indeed need an additional "next" pointer per element
for an slist. But as I wrote earlier, I need something else.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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