We consider a switching of the magnetic moment with an easy axis anisotropy from an up to a down direction under the influence of an external magnetic field. The driving field is applied parallel to the easy axis and is continuously swept from a positive to a negative value. In addition, a small constant perpendicular bias field is present. It is shown that while the driving field switches the moment in a conventional way, the perpendicular field creates an admixture of the precessional (ballistic) switching that speeds up the switching process. Precessional contribution produces a non-monotonic dependence of the switching time on the field sweep time with a minimum at a particular sweep time value. We derive an analytic expressions for the optimal point, and for the entire dependence of the switching time on the field sweep time. Our approximation is valid in a wide parameter range and can be used to engineer and optimize of the magnetic memory devices.