erg/libsvm — pull request #4 by larsmans (2012-09-28 08:56:16+00:00)
Title: Speed up pow computations 20x times

... with the usual trick: don't pretend to know better than the standard library.

Lin et al. were right in not using the C function `pow`, which is quite slow, but the C++ library provides [overloaded versions](http://en.cppreference.com/w/cpp/numeric/math/pow) of this function for integer exponents. With `gcc -O2` and the GNU stdc++ library, this is about 20x as fast for typical values of degree.