About SwSortedObjs
Tomaž Vajngerl
quikee at gmail.com
Sat Mar 22 11:30:15 PDT 2014
Hi,
On Sat, Mar 22, 2014 at 2:54 PM, Miklos Vajna <vmiklos at collabora.co.uk> wrote:
> Nah, you just mentioned in general, that you would need a set (which is
> a sorted container where the key is not separated from the value) which
> has an operator[], and I believe map is just that.
He didn't say that. He said that the current implementation has
operator[] but it is used in iterations only, so instead of
operator[], a iterator (which std:set supports ofcourse) would be
enough to replace those cases.
Anyway.. sorted data structures usually use binary search for any
insert which is also currently used (I hope). The only problem is the
vector as for any insert to an arbitrary position it has to copy all
succeeding elements, which can get slow when the number of elements
increases. But if this happens infrequently and the number of elements
is low, it just doesn't really matter.
Regards, Tomaž
More information about the LibreOffice
mailing list