They call the math functions in the C runtime library. I have not experimented with faster approximations. I suspect that there is enough overhead in the use of blue nodes in general that it wouldn't really save you much time, but I'm not sure. You could try using an image map shader and see if that's faster (but that also adds overhead so I doubt it will be).