[pacman-dev] Various code-cleanups

Aaron Griffin aaronmgriffin at gmail.com
Wed Jan 17 16:27:33 EST 2007


On 1/17/07, Dan McGee <dpmcgee at gmail.com> wrote:
>/* TODO only use of a math.h function in entire libalpm,
> *      can we get rid of it? Former code line:
> *if(numscans > numtargs) {
> */
> if(numscans > sqrt(numtargs)) {

Interesting point.  It does appear that the sqrt is merely an
optimization.  We could probably use numtargs/2 and achieve much the
same overall speedup, as 'N' in these loops is probably in the
100-1000 range, this won't be a bottleneck.

Might be worth a test though.  Still, I have no real opinion on
whether the removal of libm as a dep is worth it or not.




More information about the pacman-dev mailing list