title: C/C++ fastest cmath log operation
body: <p>I'm trying to calculate log<sub>a</sub>b (and get a floating point back, not an integer). I was planning to do this as <code>log(b)/log(a)</code>. Mathematically speaking, I can use any of the <code>cmath</code> log functions (base 2, e, or 10) to do this calculation; however, I will be running this calculation a lot during my program, so I was wondering if one of them is significantly faster than the others (or better yet, if there is a faster, but still simple, way to do this). If it matters, both a and b are integers.</p>