Changeset 13637


Ignore:
Timestamp:
Dec 9, 2012, 7:08:06 PM (9 years ago)
Author:
jordan
Message:

in bitfield.c, speed up countArray() by about 15%

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bitfield.c

    r13636 r13637  
    4848countArray (const tr_bitfield * b)
    4949{
    50   size_t i;
    5150  size_t ret = 0;
    52 
    53   for (i=0; i<b->alloc_count; ++i)
     51  ssize_t i = b->alloc_count;
     52
     53  while (--i >= 0)
    5454    ret += trueBitCount[b->bits[i]];
    5555
Note: See TracChangeset for help on using the changeset viewer.