D4313: pycompat: wrap xrange for py2 to provide efficient __contains__

joerg.sonnenberger (Joerg Sonnenberger) phabricator at mercurial-scm.org
Fri Aug 17 17:50:05 EDT 2018


joerg.sonnenberger added a comment.


  It's used in reportphasechanges and that accidently turned O(n) into O(n^2). I noticed it when trying a clone --narrow of the NetBSD repo, since it hung for quite a while in  that loop.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4313

To: joerg.sonnenberger, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list