Re:Re: CList glitch (some kind o off-topic response)


> Yes, prepending is much faster. GLib does not keep track of the tail
> of lists, so appending an item will be an O(n) operation, making
> appending n items an O(n^2) operation.
> Prepending is O(1), so prepending n items will be O(n).

Wow, this kind of information is really useful. It would be great if this kind of info became part of the API docs, when they are finished.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]