In this paper, an efficient algorithm is proposed to generate a smooth near-time-optimal feedrate function along a parametric tool path for three-axis CNC machining under a feedrate bound, an acceleration bound for each axis, and a chord error bound. The algorithm first gives a discrete and computationally efficient algorithm to find a sequence of globally optimal velocity points under the feedrate, acceleration, and chord error bounds. A linear programming strategy is proposed to smooth the velocity points sequence. Finally, the velocity points sequence is fitted into a cubic spline to obtain a near-time-optimal and smooth feedrate function. Simulation and experiment results for Non-uniform rational basis spline curves are presented to illustrate the feasibility of the algorithm.