[Commented On] D12139: rank: naive rank property computation and retrieval

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Feb 8 14:19:13 UTC 2022


marmoute added inline comments.

INLINE COMMENTS

> Alphare wrote in revlog.py:877
> Why is this called `fast_rank`? Are we expecting to have a (possibly slower) `def rank` somewhere down the line?

It is a the `fast_rank` because it a cached value that can be retreived in O(N). Not a computed value that would be expensive to compute. Using the rank when available could help various algorithm (outside of the initial target) for example ancestors checking or discovery. However it is unlikely to be worth computing the rank of the fly for these usecases.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12139/new/

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

To: pacien, #hg-reviewers, Alphare
Cc: Alphare, marmoute, joerg.sonnenberger, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220208/32ff4b8d/attachment-0002.html>


More information about the Mercurial-patches mailing list