When downcasting, the answer is certainly yes, since it requires a walk down a tree with multiple choices at every level.
When upcasting, it depends on how the iteration is done to walk up the type tree. Under most circumstances the answer would probably be yes, but some optimisations on the tree (specifically, its layout in memory) might allow the walk-up to be a branchless operation.