As I suspected, it's much too slow. This is part of a larger binary search algorithm, so I end up doing this transformation 336 times on channels with ~1800 values. My previous way of doing this, with the 8th order polynomial, took about 0.04seconds per transformation for a total of about 13 seconds. With this method, I'm getting about 0.75 seconds per transformation, for a total of ~252 seconds. Also, this is being run on the simplest case, a 3 cylinder engine. If I run it on an 8 cylinder, we add ~600 values per cylinder, and I don't know how to calculate Olog(n) for this, so many more than 336 transformations...
In addition, I think I need the transfer function to have an accuracy of 0.0001 over a span from 0.5 to 1.5 to avoid interpolating. I achieved this by modifying your proposal and using slope for the exrapolation method in the linear map function, and 10,000 data points for the interpolation channel. To be honest, I don't know what level of accuracy I actually need in the interpolation channel. I want my search algorithm to produce an accuracy of 0.001, so I'm running the algorithm to 0.000001. This isn't optimized, (more of a SWAG) but isn't a problem with 13s run time.
So, I guess, bottom line, in the current implementation I need the transformation to be <0.1s per.
(An interesting side note, if I did what I'm doing with a linear search algorithm, it would take ~10 million years to run 🙂 )