The scanning logic of a switch is flexible and easy for you
to understand and see, but if you have long lists of
options that you are processing within a loop, it will be
a lot slower than dispatching on a hash lookup. If you
can arrange to do it the latter way, it is generally
worth doing so.
Just something to be aware of.