in reply to Regarding speed: Is elsif or just if faster?

I don't have a good reference to back this up, but...

do you want to always pay the overhead of 3 if checks or always pay for one if and occasionally some elsif checks? The latter is better.

Especially if you know the likelihood of the conditions in your cascade. We use the knowledge of condition statistics to tailor our cascades to accomodate the highest percentage of repeating conditions.