in reply to What is the most efficient perl switch/case statement?
For instance, if there are a hundred cases, and each case is taken about 1 out of 100 times, a hash based solution might be best. If all the cases are small non-negative integers, then an array based solution is to be preferred. But if one case is taken far more than any other, an if/elsif chain, with the common case first might be the most efficient solution.
Abigail
|
|---|