Use the newer more generic sampling and interpolation functions
developed recently (ab444a80a280) instead of the CurveEval type.
Functions are split up a bit more internally, to allow a separate mode
for supplying the curve index directly in the future (T92474).
In one basic test, the performance seems mostly unchanged from 3.1.
Test file: