Adding in Sheehan's speed up suggestion: Plan the chebyshevtransform. Small speed up.