extend "in" to all array types

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jan 15 11:08:49 PST 2014


On Wed, Jan 15, 2014 at 10:57:14AM -0800, Ali Çehreli wrote:
> On 01/15/2014 07:38 AM, Adam D. Ruppe wrote:
> 
> > Probably not, since there's a significant speed difference between in
> > associative array and in regular array. For a regular array, it means
> > potentially looping over every item in the array.
> 
> And a specialization for std.range.SortedRange would use binary search:
> 
>   http://dlang.org/phobos/std_range.html#.SortedRange
[...]

Does std.algorithm.find have a specialization for SortedRange? I know
that some algorithms do, I just don't remember which.


T

-- 
What do you get if you drop a piano down a mineshaft? A flat minor.


More information about the Digitalmars-d mailing list