What does to!someEnum(string) lower to? Comparing speed to someEnum[string] AA lookups

Adam D. Ruppe destructionator at gmail.com
Sat Mar 1 08:50:38 PST 2014


enum to string uses a switch if possible (src/phobos/std/conv.d 
line 844)

I think the code that does string to enum is on line 2194, which 
is a foreach { if {} } loop that never breaks; it always checks 
all of them.


More information about the Digitalmars-d-learn mailing list