Follow-up Comment #16, bug #17560 (project cvs):

Probably a longish file could help show the differences too, since part of
what the improved algorithm was doing was shifting portions of an array
forward and backwards (using memcpy) as sections were deleted and other
sections were inserted into the array (once per RCS change text chunk).  The
more lines in the file, the more lines would need to be shifted in memory for
each RCS change chunk.

The new algorithm is simply careful to build a second array in order rather
than shifting the first in place.

So really, I think the new algorithm is more exactly O(C + L), where C is the
number of RCS change chunks to be processed and L is the total number of lines
in the head revision, whereas it was previously approximately O(C * L / 2).

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?17560>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
Bug-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bug-cvs

Reply via email to