Let $g(x) = \exp(f(x))$. Assuming numerical (or symbolic) values of $f(x), f'(x), f''(x), \ldots, f^{(n)}(x)$ are known, is there a way to compute $g'(x), g''(x), \ldots g^{(n)}(x)$ (or even the single value $g^{(n)}(x)$) for large $n$ that is faster than explicitly generating and evaluating the expanded symbolic derivative, a polynomial which has $p(n)$ (partition function) terms?

Yes, you can. For example, the normal evaluation for $n=6$ requires 33 multiplications and 10 additions. But by using an optimized straightline program which takes care of common subexpression elimination, you can reduce that to 17 multiplications, 10 additions and 4 assignments. For $n=8$, the reduction in multiplications goes from 84 down to 37, and at $n=12$, it goes from 397 down to 114. Note that multiplication by constants (like $10f'(x)$) counts as a multiplication too. You can experiment with these things by using the Unfortunately, at this point, I do not immediately see a pattern in the results, so I am not sure how to automate this and produce optimized versions directly. But the answer to your original question is definitely 'yes'. 


Try automatic differentiation, which is exact but not symbolic. See also The Arithmetic of Differentiation by L. B. Rall. 

