Avoid recalculating X^q when f(p): X.^1 ... X.^p

Thank you for the heads-up about performance and accuracy, for those following along, see @stevengj’s efficient X^p, p=1...n script here.

Just to be clear, the ‘cache’ misses you mention refer to the PowerCache in Max’s code above?