------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2005-01-12 16:17 ------- Current status is that with -O2 on mainline we generate the same (better) code for ::pow(x, 2) and std::pow(x, 2.0) than for std::pow(x, 2) which looses because of the lack of unrolling (PR19401).
Also, ::pow(x, 27) and other exponents will always generate better code than the std::pow(x, 27) variant due to the technically superior implementation of gcc/builtins.c:expand_powi. The attached patch solves all of these problems, unfortunately in ways the libstdc++ maintainer(s) do not like. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11706