@monarchdodra Ah, good idea. And actually, now that I look at my implementation, that's what I did.

@JakobOvrum That wouldn't surprise me at all. If there's a problem with switch statements, it's almost certainly mostly an issue with dmd's optimizer. Where I'd be most worried though would be with strings. Some of the switch statements in std.datetime were already changed to use arrays or AAs (by Peter Alexander IIRC) for efficiency reasons, and I believe that that was determined via profiling, but I think that they were also for strings and not integers, and if anything were to be efficient with switch statements, it would be integers.