Dynamic or Static polymorphism - what is better?

Neither has side effects so the optimizer removes the entire lot.

The point is ... Get it working. Then optimize.