
"Mathias Gaunard" <mathias.gaunard@etu.u-bordeaux1.fr> wrote in message news:etei0b$o33$1@sea.gmane.org...
Gennadiy Rozental wrote:
"Mathias Gaunard" <mathias.gaunard@etu.u-bordeaux1.fr> wrote in message
They're a more time and space efficient alternative for node-based containers of pointers when you have the possibility of modifying the type to make it into a node.
Why? And how much? I need specific numbers.
So basically, if you have std::list<T*>, and you can modify T, then it is more efficient to use std::ilist<T>.
Why? how std::list<T*> prevent you to modify the pointed value and/or how does it affect performance?
Because std::list<T*> generates a node type that should look like that:
struct list_node { T* value; list_node* next; list_node* prev; };
This adds some indirection.
So? could you give an example of an algorithm? And/or other speific performace advantage example? Gennadiy