# Improving speed performance of 'Fit' with BSplines?

### Context

In the context of this (vaguely controversial) question, I am stumbling into a performance issue with Fit.

Let me illustrate on fitting a set of BSplines to set of 64 data points:

dat = Table[{i, Sin[i^2]}, {i, 0, 2 Pi, Pi/32}] // N;
fspl = Interpolation[dat, Method -> "Spline"];
fb = First[Cases[fspl, _BSplineFunction, ∞]];
{sd, scpts, sk} = fb /@ {"Degree", "ControlPoints", "Knots"};
func = Flatten[Outer[Times, Sequence @@ MapThread[
Table[BSplineBasis[{#1, #2},k-1, #3], {k, #4}] &, {sd, sk, {x}, Dimensions[scpts]}]]];
fit = Fit[dat, func,x, FitRegularization -> {"Curvature", 1.}]; // Timing

(* 0.008626 *)

Plot[fit, {x, 0, 2 Pi}]

But if I now ask say for 1024 points

dat = Table[{i, Sin[i^2]}, {i, 0, 2 Pi, Pi/512}] // N;
fspl = Interpolation[dat, Method -> "Spline"];
fb = First[Cases[fspl, _BSplineFunction, ∞]];
{sd, scpts, sk} = fb /@ {"Degree", "ControlPoints", "Knots"};
func = Flatten[Outer[Times, Sequence @@ MapThread[
Table[BSplineBasis[{#1, #2}, k-1, #3], {k, #4}] &, {sd, sk, {x}, Dimensions[scpts]}]]];
fit = Fit[dat, func,x, FitRegularization -> {"Curvature", 1.}]; // Timing

(* 5.83293 *)

It takes dramatically much longer! (and it get much worse with higher sampling)

### Question

Is is possible to improve the performance of Fit on this specific problem?