
22 Feb
2004
22 Feb
'04
3:41 a.m.
John Meacham
The reason I ask is I am writing someting which will generate large case statements [over strings] and want to know if I should bother pre-optimizing it to [search tries]¹
I've no idea what compilers do, but one quick-and-dirty way to optimize this could perhaps be to insert the strings into a FiniteMap, and use lookupFMWithDefault(?) to get the resulting value? -kzm ¹ I think this is an accurate representation of your question? -- If I haven't seen further, it is by standing in the footprints of giants