C++ Logo


Advanced search

Re: String contains member function

From: Matthew Woehlke <mwoehlke.floss_at_[hidden]>
Date: Fri, 31 May 2019 11:22:36 -0400
On 31/05/2019 10.56, Giuseppe D'Angelo via Std-Proposals wrote:
> On 31/05/2019 14:31, Ville Voutilainen via Std-Proposals wrote:
>> Well, {map,set}::contains is a logarithmic operation, string::contains
>> would be linear. That could well be an argument for naming the linear
>> operation differently from the logarithmic one.
> What about std::unordered_map::contains then?

That's still sub-linear (except in pathological cases).


Received on 2019-05-31 10:24:25