D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-08-15 Thread alex_gaynor (Alex Gaynor)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG055fee3547df: merge: removed sorting in casefolding detection, for a slight performance win (authored by alex_gaynor). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.o

D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-08-11 Thread alex_gaynor (Alex Gaynor)
alex_gaynor added a comment. If you want error message stability I'm pretty sure I can get that by changing the error message formatting to be `tuple(sorted([f, foldmap[fold]))`. Let me know if you'd like me to add that. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-sc

D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-08-10 Thread quark (Jun Wu)
quark accepted this revision. quark added a comment. Looks good to me. I'd prefer perf to error message stability. If the latter is a concern, we can re-run the loop if there is at least one case-folding collision detected. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial

D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-08-10 Thread alex_gaynor (Alex Gaynor)
alex_gaynor updated this revision to Diff 737. alex_gaynor added a comment. Herald added a reviewer: hg-reviewers. Undo a change which was incorrect REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D30?vs=46&id=737 BRANCH performance-changes (bookmark)

D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-08-10 Thread alex_gaynor (Alex Gaynor)
alex_gaynor added inline comments. INLINE COMMENTS > quark wrote in merge.py:765 > I think this would be incorrect, since `foldprefix` is mutated and used in > the loop. I think you're right, removing the first `sorted` should be safe though. REPOSITORY rHG Mercurial REVISION DETAIL https

D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-08-09 Thread quark (Jun Wu)
quark added a comment. @durin42 The case-folding collision might be a small feature that Rust is meaningful. INLINE COMMENTS > merge.py:765 > foldprefix = unfoldprefix = lastfull = '' > -for fold, f in sorted(foldmap.items()): > +for fold, f in foldmap.items(): > if fol

[Differential] [Commented On] D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-07-14 Thread alex_gaynor (Alex Gaynor)
alex_gaynor added a comment. Going to note that I'm less confident in the correctness of the second change than I am the first. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D30 EMAIL PREFERENCES https://phab.mercurial-scm.org/settings/panel/emailpreferences/

[Differential] [Commented On] D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-07-14 Thread alex_gaynor (Alex Gaynor)
alex_gaynor added a comment. Not quite sure this is science, but First set of numbers is `tip`, second is with my patch: ~/p/mozilla-central ❯❯❯ time ~/projects/hg/hg up consolidate-sandbox-disable; time ~/projects/hg/hg up central 4324 files updated, 0 files merged, 491 f

[Differential] [Commented On] D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-07-14 Thread durin42 (Augie Fackler)
durin42 added a comment. Ah, I see. Alex, do you have any idea what the performance numbers on this are like, anecdotally on your mozilla repo? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D30 EMAIL PREFERENCES https://phab.mercurial-scm.org/settings/panel/e

[Differential] [Commented On] D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-07-14 Thread alex_gaynor (Alex Gaynor)
alex_gaynor added a comment. Whether or not an error occurs is deterministic, the exact message is the only non-deterministic bit (assuming there's no bugs, heh). REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D30 EMAIL PREFERENCES https://phab.mercurial-scm.o

[Differential] [Updated] D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-07-14 Thread durin42 (Augie Fackler)
durin42 added a comment. In https://phab.mercurial-scm.org/D30#1098, @quark wrote: > > Is it important that the error be deterministic? > > Good question. Deterministic error is just to make tests stable AFAIK. If the perf win is noticable, I personally prefer perf win. We can use `(g

[Differential] [Commented On] D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-07-14 Thread quark (Jun Wu)
quark added a comment. > Is it important that the error be deterministic? Good question. Deterministic error is just to make tests stable AFAIK. If the perf win is noticable, I personally prefer perf win. We can use `(glob)` and `(?)` in tests to make it support non-deterministic outputs

[Differential] [Commented On] D30: merge: Removed sorting in casefolding detection, for a slight performance win

2017-07-14 Thread alex_gaynor (Alex Gaynor)
alex_gaynor added a comment. Is it important that the error be deterministic? I think we can improve the situation if you have exactly two collisions, by sorting `(f, foldmap[fold])` and `(lastfull, f)`, but I don't think it can easily be preserved for multiple collisions. REPOSITORY