Performance of hashes and associative arrays

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Sat Nov 10 05:37:23 PST 2012


On 11/07/2012 07:38 AM, "Raphaël.Jakse" <raphael.jakse at gmail.com>"@puremagic.com 
wrote:
> We want to be able to get the hash of s. Therefore, we re-implement the toHash
> method of the Student class :

OK, now I'm curious.  Assuming I don't write a custom re-implementation, how 
would a custom struct or class be hashed?  (What about a tuple?)

I ask because I'm considering associative arrays where the key is a custom class 
or tuple as part of a current coding project.


More information about the Digitalmars-d-learn mailing list