( )⚙ D5942 rust: less set lookups in AncestorsIterator

This is an archive of the discontinued Mercurial Phabricator instance.

rust: less set lookups in AncestorsIterator
ClosedPublic

Authored by gracinet on Feb 12 2019, 7:01 AM.

Details

Summary

This uses the boolean return of HashSet::insert() to factor
pairs of contains()/insert() into a single insert()

On the mozilla-central repository (450k changesets), I get about a bit more
than 10% better medians in perfancestors (taking the mean of three runs)

Best run for parent changeset:

! wall 0.106474 comb 0.110000 user 0.110000 sys 0.000000 (median of 93)

Best run fot this changeset:

! wall 0.093191 comb 0.090000 user 0.090000 sys 0.000000 (median of 100)

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

gracinet created this revision.Feb 12 2019, 7:01 AM
This revision was automatically updated to reflect the committed changes.