Floating point optimizations for pow() (note: all the histograms could totally be integers):
I think it was the second answer to the stackoverflow link that contained a pow() implementation that could be made arbitrarily accurate and took just a few instructions to execute.
Integer optimizations for pow():
I'm not yet finding a library that contains these from google. The optimizations are almost a decade old.