On 15/12/2010 23:12, Jean-Marc Lasgouttes wrote:
Le 15/12/2010 18:51, Abdelrazak Younes a écrit :
It seems correct. At the time I remember saying to myself that using
std::distance was not optimal and that we should use some new fast
method in RandomAccessList but I did not bother because it was fast
enough. So it is not fast enough for this use case it seems :-)

And I remember that I never understood why we use this RandomAccessList
instead of a vectos<Component*> that masquerades as a vector<Component>.
IOW, what is the underlying std::list good for?

We had this discussion already, look in the archives! :-P
In summary, the advantage is that the memory management is easier to do than doing it by hand with the pointer vector solution. I also suspect that the resulting code will be bigger (unless you use some boost thing of course). But as I said at the time, I am really not opposed to the change, provided that I don't do it :-)

Abdel.

Reply via email to