Created on 2007-09-08.00:00:00 last changed 172 months ago
Proposed resolution:
Change [binary.search]/3
Complexity: At most log2(last - first) +
2O(1) comparisons.
[ Sophia Antipolis: ]
Alisdair prefers to apply an upper bound instead of O(1), but that would require fixing for lower_bound, upper_bound etc. as well. If he really cares about it, he'll send an issue to Howard.
In [binary.search] p. 3 the complexity of binary_search is described as
At most log(last - first) + 2 comparisons.
This should be precised and brought in line with the nomenclature used for lower_bound, upper_bound, and equal_range.
All existing libraries I'm aware of, delegate to lower_bound (+ one further comparison). Since issue 384 has now WP status, the resolution of #787 should be brought in-line with 384 by changing the + 2 to + O(1).
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3774 |
2010-10-21 18:28:33 | admin | set | messages: + msg3773 |
2007-09-08 00:00:00 | admin | create |