Originally posted by Stu Thompson:
2. Humph. I thought I read something about the compiler requiring accessibility (?) and my example switch structure seems to have an easily detectable chunk of dead code.
Originally posted by Jim Yingst:
Depending on the case arguments, in some cases they can compile to a short series of if / else statements.
Originally posted by William Brogden:
1. cases are limited to int for efficiency in building jump tables - there is no rational reason to use longs which would require 64 bits and two memory accesses to load the value.