Runtime and Dynamic Optimality