Sometimes, the best way to do this kind of things is rather simple. If the problem is computing this function a lot of times, then... don't compute it!
Basically, all you have to do is to write a table for a finite set of values $x_j$. If you are going to compute $f(x)$ with $x\in[a,b]$, then you compute $f(x_j)$, where $x_j=a+j\Delta x$, $\Delta x=(b-a)/N$. The larger $N$, the better representation of the function you get.
You compute this table once, at the beginning of the program. You could additionally write it to a file and simply recover it at the beginning.
Finally, if you need $f(x)$, with $x_j<x<x_{j+1}$, you return $f(x)\simeq(f(x_j)+f(x_{j+1}))/2$. Since your function is continuous, if $\Delta x$ is small enough, you are going to have a very good approximation for $f(x)$. And you avoid computing the function, since all the $f(x_j)$ are stored in memory.
This "trick" really saves a lot of computations (at expense of having the results stored in memory) and in my opinion it is not used as much as it should.