Reach speed target?

How to reach airspeed target immediately on auto mode or in guided mode as soon as possible ?!
**In cpp code
:pray:
I want to know its law in cpp code
** Where in the autopilot code does it change the throttle to reach target speed as soon as possible