|
Boost Users : |
From: Timmo Stange (ts_at_[hidden])
Date: 2007-02-11 19:15:11
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net