The 3-argument form of switch does not get bytecompiled, despite the suggestion in the source code that it does. See
http://core.tcl.tk/tcl/artifact/3805ec834a6f0d7bb27d13f893242acb82229c36?ln=1031,1033
These result in a jump table:
::tcl::unsupported::disassemble script {switch $a {foo - bar - baz {set a 1}}}
::tcl::unsupported::disassemble script {switch -exact -- $a {foo - bar - baz {set a 1}}}
But this does not
::tcl::unsupported::disassemble script {switch -exact $a {foo - bar - baz {set a 1}}}
|