From: Michael Haggerty Date: Sat, 13 Aug 2016 00:09:41 GMT Subject: Re: [PATCH 8/8] diff: improve positioning of add/delete blocks in diffs Message-ID: <2ceda4e1-c927-598b-ee29-598bced21978@alum.mit.edu> In-Reply-To: On 08/04/2016 06:55 PM, Stefan Beller wrote: > [...] > I have just reread the scoring function and I think you could pull out the > `score=indent` assignment (it is always assigned except for indent <0) > > if (indent == -1) > score = 0; > else > score = indent; > ... lots of bonus computation below, which in its current implementation > have lots of "score = indent;" lines as well. Yes. An earlier version of the heuristic used different indent values in different situations, but that's gone away so the code can be made simpler now. I'll make the change. Thanks, Michael