A method of controlling a switching power converter, the switching power converter having at least one electronic power switch, comprising: determining a level of a gate drive voltage to apply to a gate of the electronic power switch based on at least one operating parameter of the switching power converter; and applying the gate drive voltage at the determined level to the gate of the electronic power switch; wherein switching power loss in the electronic switch is reduced to optimize efficiency of the switching power converter and wherein the parameter includes a parameter related to an efficiency at which the switching power converter is operating, the method including: a. determining a direction of change in the efficiency of the switching power converter after changing the gate drive voltage level; b. comparing the direction of change in efficiency of the switching power converter to the direction of change in the gate drive voltage level; and c. decreasing the gate drive voltage level when the direction of change in the gate drive voltage level and the direction of change in the efficiency are opposite and increasing the gate drive voltage level when the direction of change in the gate drive voltage level and the direction of change in efficiency are the same; and optionally wherein the parameter includes input current and determining the direction of change in the efficiency includes determining the direction of change in the input current. determining a level of a gate drive voltage to apply to a gate of the electronic power switch based on at least one operating parameter of the switching power converter; and applying the gate drive voltage at the determined level to the gate of the electronic power switch; wherein switching power loss in the electronic switch is reduced to optimize efficiency of the switching power converter and wherein the parameter includes a parameter related to an efficiency at which the switching power converter is operating, the method including: a. determining a direction of change in the efficiency of the switching power converter after changing the gate drive voltage level; b. comparing the direction of change in efficiency of the switching power converter to the direction of change in the gate drive voltage level; and c. decreasing the gate drive voltage level when the direction of change in the gate drive voltage level and the direction of change in the efficiency are opposite and increasing the gate drive voltage level when the direction of change in the gate drive voltage level and the direction of change in efficiency are the same; and optionally wherein the parameter includes input current and determining the direction of change in the efficiency includes determining the direction of change in the input current. a. determining a direction of change in the efficiency of the switching power converter after changing the gate drive voltage level; b. comparing the direction of change in efficiency of the switching power converter to the direction of change in the gate drive voltage level; and c. decreasing the gate drive voltage level when the direction of change in the gate drive voltage level and the direction of change in the efficiency are opposite and increasing the gate drive voltage level when the direction of change in the gate drive voltage level and the direction of change in efficiency are the same; and optionally