A Comparison Between Fixed-Basis and Variable-Basis Schemes for Function Approximation and Functional Optimization