in reply to elsif chain vs. dispatch

You are not comparing looking up by iteration and looking up something in a hash. You are comparing looking up by iteration vs. building a hash, finding something in the hash, then doing a sub call. On top of that, you're calling split on a large string to make it even harder to draw any conclusions.

But even if you fix all those issues, the still you can only draw conclusions if you have a large number of cases, and each case is picked equally well. Typically, one dispatches between far less cases, and not every case occurs equally often.