[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Further diff optimization ideas

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 12 May 2011 23:34:00 +0200

Ok, to wrap this up for now: r1102471 finally put these thoughts into
notes/diff-optimizations.txt, with some of Stefan2's feedback/ideas
integrated into it.

I also added another, previously mentioned idea into the notes file,
which I forgot to mention in this mailthread:

--- 8< ---
Avoid some hashing by exploiting the fact that matching lines often come
   in series.

  - If the previous line had a match with the other file, first try to
    directly compare (memcmp) the next line with the successor of the
    matched line. Only if it doesn't match, calculate the hash to insert
    it into the container.
  - This approach probably conflicts with the "Merge hash calculation with
    EOL scanning" suggestion.
--- 8< ---

(not sure if this is a worthwhile idea, but just thought I'd mention it).

Cheers,

-- 
Johan
Received on 2011-05-12 23:34:50 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.