Efficient Knot Optimization for Accurate B-spline-based Data Approximation