Performance of hashes and associative arrays

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Sun Nov 11 10:51:12 PST 2012


On 11/11/2012 07:40 PM, Ali Çehreli wrote:
> I think std.container.RedBlackTree can take that responsibility but if you don't
> need the elements to be in any particular order, then it may be seen as an
> overkill as well.

I know, and I probably should give that a go, but as I've got working code right 
now I'm moving on to something else and will come back to it later.

> If all you need is 'if(i in list)', then a HashSet may help. I haven't used one
> myself but apparently there are such data structures in other languages like
> Java and C#.

Indeed, and I was wondering whether it might be worth writing an implementation 
for std.containers.  As it stands I don't really feel familiar enough with the 
underlying concepts, but I may revisit that idea once I'm done with a few other 
things.



More information about the Digitalmars-d-learn mailing list