As I understand it, dmd's implementation of switch statements is extremely poor at this point (particularly with regards to strings), so you end up with switch statements that _could_ and _should_ be efficient being very inefficient. Whether this particular case would be faster or slower than an AA with the current dmd implementation or not, I don't know. As I said, it would have to be profiled. If it were strings though, I'd be _very_ surprised if the switch statement were faster. It _is_ integers however, so the switch may win.