From: Bjorn Munch Date: May 25 2011 8:06am Subject: Re: bzr commit into mysql-5.1-telco-7.0-wl4124 branch (pekka:4381) WL#4124 List-Archive: http://lists.mysql.com/commits/138049 Message-Id: <20110525080629.GA3906@khepri15.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On 24/05 17.54, Pekka Nousiainen wrote: > === modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp' > --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp 2011-05-24 14:26:59 +0000 > +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp 2011-05-24 17:54:07 +0000 > @@ -203,7 +203,7 @@ Dbtux::getPathToNode(NodeHandle node, Ui > static double > tux_log2(double x) > { > - return ::log(x) / ::log(2); > + return ::log(x) / ::log((double)2.0); Just a comment from the sidelines, I have no idea what this is used for or how often. It just seems like a waste to recalculate log(2.0) every time, why not store it in a constant? If this isn't used very fequently I guess it doesn't matter and the code is of course clearer this way. - Bjorn (just browsing the commit list....)