12 Feb
2007
12 Feb
'07
12:15 a.m.
Frank Mori Hess wrote:
connect() is O(n) anyways, if you do automatic slot cleanup there.
I suppose a binary search would work too, since the list is kept ordered. That would reduce the insertion time when a group is specified to O(log n). Connect for ungrouped slots is already O(1).
You need a container with random access iterators in order for that to have the expected complexity. The automatic slot cleanup theoretically only needs to check one slot per connect() in order to avoid the problem we discussed. And it's not used in existing code anyway. Regards Timmo Stange