Thoughts on diff extensions

Christopher Li hg at chrisli.org
Sun Jun 19 18:11:43 UTC 2005


On Sun, Jun 19, 2005 at 10:26:28AM -0700, Matt Mackall wrote:
> Take revisions 300 and 486 of linux-hg/Makefile. Diff them 100 times
> with and without -d. With -d is something like 5-10 times slower.

The first number is time, the second is hunks. The third is inserted bytes.
First line is GNU diff, second line is python difflib.

$ testsm.py		"with -d"
0.5365858078 178 35590
0.628619909286 91 44191
$ testsm.py 		"without -d"
0.0662178993225 157 35592
0.628921031952 91 44191

difflib blow up output size by 15%?

So I guess we can just use GNU difflib without the "-d" flag by default.
Let it as config options for user who really want "-d". It is trivial to do.

Chris




More information about the Mercurial mailing list