From h to p efficiently: Strategy selection for operator evaluation on hexahedral and tetrahedral elements