Boost logo

Boost :

From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2006-02-04 08:00:20


David Abrahams wrote:
> Thorsten Ottosen <tottosen_at_[hidden]> writes:
>>David Abrahams wrote:
>>>Thorsten Ottosen <tottosen_at_[hidden]> writes:
>>>>David Abrahams wrote:

>>>Sure you can; you just look at your implementation and if it is O(1)
>>>you write a specialization of the metafunction (or whatever).
>>
>>Well, I don't personally have access to all the implementations.
>>This seems like overkill.
>
>
> std::list is not the only sequence out there that might have O(1) size
> and no random access iterators! Consider slist, hash_set, ...

right, so what do you propose exactly?

>>I was told that Duffing could actually hurt a modern optimizer.
>
>
> Loop unrolling helps unconditionally in this sort of case because you
> eliminate comparisons and branches.

how much does it help and on which datastructures and for which
types in the container?

-Thorsten


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