safer casts - take II

terranium spam at here.lot
Wed May 14 09:04:11 PDT 2008


Dee Girl Wrote:

> In my code I use often capability test.

I see no problem, if you want it, use it.

> Then linear search is fast up to 32 elements. Only then hash is best.

don't forget, with if-else chain you do type check on every element, typecheck is implemented as looping through vtable. With type hashtable you process typeinfo only once, then you search for its hash.



More information about the Digitalmars-d mailing list