degree_3: Improving speed of polynomial's degree()