Faster computation of $ke^{-(x - h)^2}$
There are several reasons why your standard library implementation of exp is slower than you might hope:

It should to be accurate to 0.5ulp (or 1ulp at worst), no matter what number you give it. This means that special care may need to be taken, say, in the subnormal range.
It needs to work for all floating point numbers, and return a reasonable answer for all of them. Assuming that you're on an IEEE-754 platform, this includes NaN, Inf, etc. The standard explains what the &quot;correct&quot; answer is for all of those cases, and the library function needs to get it right.
It may not be specialised for your specific instruction set (i.e. your CPU may have some advanced floating-point instructions that libc doesn't use by default).

This is what it means to be general-purpose.
Chances are that your standard library has had a lot of effort put into it, and you cannot beat it and still be general-purpose. To get more performance, you need to relax some restrictions. So we're going to need some details. How much accuracy is enough? Can you assume anything about the range of inputs?
I've gone through a typical implementation elsewhere (see this previous answer), and that should help you get an idea of how these things can be implemented.