Also interesting to note that Chrome (27 at least) [sucks at switch](http://jsperf.com/switch-statement-vs-if-else/4) (thought it would have been able to optimize more on this).