Didn't we update it this already? I seem to get 10/9 here not 11/10.
Current 'maint' (cd2b8ae9), 'master' (4b5eac7f)...
That's a tad old master you seem to have.
Strangely, bisection points at 27af01d5523, which was supposed to be only
about performance and never about correctness. There is something fishy
going on....
From: Alexander Pepper <hidden> Date: 2016-06-15 22:52:05
Am 21.09.2011 um 22:35 schrieb Junio C Hamano:
That's a tad old master you seem to have.
Up until now I only followed the github clone, but that seems to be dated. Since kernel.org is still down, I'll now follow the google code clone.
Am 21.09.2011 um 22:35 schrieb Junio C Hamano:
Didn't we update it this already? I seem to get 10/9 here not 11/10.
Current 'maint' (cd2b8ae9), 'master' (4b5eac7f)...
Strangely, bisection points at 27af01d5523, which was supposed to be only
about performance and never about correctness. There is something fishy
going on....
I also did some tests, and besides --numstat also git show sometimes show different patches in comparison to older git versions. The last version with the "old" git show output is 1.7.7.rc0 and the first version with the "new" git show output is 1.7.7.rc1.
with git version 1.7.7.rc0:
$ git show 679e1d5cd007a0a9cb2813bd155622d7a1e904bd :
[...]
@@ -64,16 +64,21 @@ public class RequestCounter {Accumulatoraccum=values.get();longnow=System.currentTimeMillis();-if(now-accum.startTimeMS>durationMS){-AccumulatornewWithTotal=accum.newWithTotal();-values.set(newWithTotal);--/*-*trytoset.ifwefail,thensomeoneelsesetit,sojustkeepgoing-*/-if(values.compareAndSet(accum,newWithTotal)){-returnnewWithTotal;-}+/*+*ifstillinthewindow,justreturnit+*/+if(now-accum.startTimeMS<=durationMS){+returnaccum;+}++/*+*trytoset.ifwefail,thensomeoneelsesetit,sojustreturnthatnewone+*/++AccumulatornewWithTotal=accum.newWithTotal();++if(values.compareAndSet(accum,newWithTotal)){+returnnewWithTotal;}returnvalues.get();
with git version 1.7.7.rc1:
$ git show 679e1d5cd007a0a9cb2813bd155622d7a1e904bd
[...]
@@ -64,16 +64,21 @@ public class RequestCounter {Accumulatoraccum=values.get();longnow=System.currentTimeMillis();-if(now-accum.startTimeMS>durationMS){-AccumulatornewWithTotal=accum.newWithTotal();-values.set(newWithTotal);+/*+*ifstillinthewindow,justreturnit+*/+if(now-accum.startTimeMS<=durationMS){+returnaccum;+}-/*-*trytoset.ifwefail,thensomeoneelsesetit,sojustkeepgoing-*/-if(values.compareAndSet(accum,newWithTotal)){-returnnewWithTotal;-}+/*+*trytoset.ifwefail,thensomeoneelsesetit,sojustreturnthatnewone+*/++AccumulatornewWithTotal=accum.newWithTotal();++if(values.compareAndSet(accum,newWithTotal)){+returnnewWithTotal;}returnvalues.get();
The difference is, that now it's shown as two delete and two added hunks instead of one bigger delete and one bigger added hunk.
with git version 1.7.7.rc1:
$ git show 679e1d5cd007a0a9cb2813bd155622d7a1e904bd | diffstat
RequestCounter.java | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
with git version 1.7.7.rc0:
$ git show 679e1d5cd007a0a9cb2813bd155622d7a1e904bd | diffstat
RequestCounter.java | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
When used git version 1.7.7.rc1 I didn't observed any case where git show and git log --numstat mismatch. I'm only a little confused, that 'git show' yields different results, depending on the git version.
Greetings from Berlin
Alex
Didn't we update it this already? I seem to get 10/9 here not 11/10.
Current 'maint' (cd2b8ae9), 'master' (4b5eac7f)...
That's a tad old master you seem to have.
Strangely, bisection points at 27af01d5523, which was supposed to be only
about performance and never about correctness. There is something fishy
going on....
The patch below reverts a part of 27af01d5523 that's not explained in its
commit message and doesn't seem to contribute to the intended speedup. It
seems to restore the original diff output. I don't know how it's actually
doing that, though, as I haven't dug into the code at all.
Alexander, can you confirm that this patch restores the old behaviour of
git diff and git show for your test cases?
Ray, are you able to write a commit message for this patch if it turns out
to be useful?
René
@@ -383,7 +383,7 @@ static int xdl_clean_mmatch(char const *dis, long i, long s, long e) {*mightbepotentiallydiscardediftheyhappearinarunofdiscardable.*/staticintxdl_cleanup_records(xdlclassifier_t*cf,xdfile_t*xdf1,xdfile_t*xdf2){-longi,nm,nreff;+longi,nm,nreff,mlim;xrecord_t**recs;xdlclass_t*rcrec;char*dis,*dis1,*dis2;
From: Tay Ray Chuan <hidden> Date: 2016-06-15 22:52:05
On Fri, Sep 23, 2011 at 12:15 AM, René Scharfe
[off-list ref] wrote:
quoted hunk
The patch below reverts a part of 27af01d5523 that's not explained in its
commit message and doesn't seem to contribute to the intended speedup. It
seems to restore the original diff output. I don't know how it's actually
doing that, though, as I haven't dug into the code at all.
[snip]
@@ -383,7 +383,7 @@ static int xdl_clean_mmatch(char const *dis, long i, long s, long e) {
* might be potentially discarded if they happear in a run of discardable.
*/
static int xdl_cleanup_records(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2) {
- long i, nm, nreff;
+ long i, nm, nreff, mlim;
xrecord_t **recs;
xdlclass_t *rcrec;
char *dis, *dis1, *dis2;
Thanks for the patch, René.
Sorry for not explaining that part of the change.
My understanding of mlim is that it "caps" how deep the for loop at
around line 387 goes through a hash bucket/record chaing to find a
matching record from side A in side B (and vice-versa in a later
loop), probably to prevent running time from becoming too long.
But with 27af01d, this is no longer a concern. We can get an *exact*,
pre-computed count of matching records in the other side, so we don't
have go through the hash bucket. Thus mlim is no longer needed.
So re-introducing mlim doesn't seem right, even though it may fix this
"bug" (ie restore the old behaviour).
--
Cheers,
Ray Chuan
From: Tay Ray Chuan <hidden> Date: 2016-06-15 22:52:06
From: René Scharfe <redacted>
27af01d (xdiff/xprepare: improve O(n*m) performance in
xdl_cleanup_records(), 2011-08-17) was supposed to be a performance
boost only. However, it unexpectedly changed the behaviour of diff.
Revert a part of 27af01d that removes logic that mark lines as
"multi-match" (ie. dis[i] == 2). This was preventing the multi-match
discard heuristic (performed in xdl_cleanup_records() and
xdl_clean_mmatch()) from executing.
Reported-by: Alexander Pepper <redacted>
Signed-off-by: Tay Ray Chuan <redacted>
---
Junio, this replaces the patch the one in the
'rs/diff-cleanup-records-fix' topic in 'pu'. The only difference is in
the patch message.
René, will need your SOB on this. Thanks for working to produce the
patch. Please disregard my earlier message [1], further reading has
shown my previous understanding to be wrong.
[1] [off-list ref]
---
xdiff/xprepare.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
@@ -398,7 +398,7 @@ static int xdl_clean_mmatch(char const *dis, long i, long s, long e) {*mightbepotentiallydiscardediftheyhappearinarunofdiscardable.*/staticintxdl_cleanup_records(xdlclassifier_t*cf,xdfile_t*xdf1,xdfile_t*xdf2){-longi,nm,nreff;+longi,nm,nreff,mlim;xrecord_t**recs;xdlclass_t*rcrec;char*dis,*dis1,*dis2;
From: René Scharfe <hidden> Date: 2016-06-15 22:52:06
Am 25.09.2011 15:39, schrieb Tay Ray Chuan:
From: René Scharfe <redacted>
27af01d (xdiff/xprepare: improve O(n*m) performance in
xdl_cleanup_records(), 2011-08-17) was supposed to be a performance
boost only. However, it unexpectedly changed the behaviour of diff.
Revert a part of 27af01d that removes logic that mark lines as
"multi-match" (ie. dis[i] == 2). This was preventing the multi-match
discard heuristic (performed in xdl_cleanup_records() and
xdl_clean_mmatch()) from executing.
Reported-by: Alexander Pepper <redacted>
Signed-off-by: Tay Ray Chuan <redacted>
---
Junio, this replaces the patch the one in the
'rs/diff-cleanup-records-fix' topic in 'pu'. The only difference is in
the patch message.
René, will need your SOB on this. Thanks for working to produce the
patch. Please disregard my earlier message [1], further reading has
shown my previous understanding to be wrong.
@@ -398,7 +398,7 @@ static int xdl_clean_mmatch(char const *dis, long i, long s, long e) {*mightbepotentiallydiscardediftheyhappearinarunofdiscardable.*/staticintxdl_cleanup_records(xdlclassifier_t*cf,xdfile_t*xdf1,xdfile_t*xdf2){-longi,nm,nreff;+longi,nm,nreff,mlim;xrecord_t**recs;xdlclass_t*rcrec;char*dis,*dis1,*dis2;