Subject: Re: [boost] [Intrusive] [MultiIndex] Random Access mental model?
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2008-11-01 15:12:51
David Abrahams <dave <at> boostpro.com> writes:
> on Sat Nov 01 2008, JOAQUIN M. LOPEZ MUÃOZ <joaquin-AT-tid.es> 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.
> I handn't looked at Boost.Intrusive before. While it looks interesting,
> it seems pretty complicated and I can't quite see any point in using it
> when I could just use Boost.Unordered with a value_type that holds an
> additional pointer. Maybe I'm missing something; I don't know.
Of course anything you can do with Boost.Intrusive (or any other lib)
you can do without. For such a simple thing as a forward_list you might
not want to incur the cost of learning a new library. In my opinion,
however, Boost.Intrusive really pays off.
JoaquÃn M LÃ³pez MuÃ±oz
TelefÃ³nica, InvestigaciÃ³n y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk