extend "in" to all array types

Ali Çehreli acehreli at yahoo.com
Wed Jan 15 10:57:14 PST 2014


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

Ali



More information about the Digitalmars-d mailing list