Could we reserve void[T] for builtin set of T ?

matovitch via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 1 08:56:21 PDT 2016


On Friday, 1 April 2016 at 15:45:13 UTC, Jack Stouffer wrote:
> On Friday, 1 April 2016 at 12:57:12 UTC, matovitch wrote:
>> I don't know about the implementation of redblack tree in 
>> phobos, but I am willing to bet on a large performance 
>> drawback if you compare it against an optimized hash table 
>> (for example using robin-hood open addressing techniques). And 
>> I guess it is for sorted set (like a heap) with O(log N) 
>> insertion and deletion (although this may be just a 
>> theoretical worry)...Furthermore, the template constraint 
>> indicate the need of a less predicate which you may not need 
>> or want to define.
>
> https://economicmodeling.github.io/containers/containers/hashset.HashSet.html
>
> There, save everyone the trouble of implementing this in the 
> compiler and complicating the language with special casing by 
> just using that.

Yep ! The code is even there.


More information about the Digitalmars-d mailing list