Page MenuHomePhabricator

rust: less set lookups in MissingAncestors
ClosedPublic

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

Details

Summary

using the return values of HashSet::remove(), we can factor
pairs of contains()/remove() into a single remove().

On a perfdiscovery run done on the PyPy repository, prepared
with contrib/discovery-helper.sh 50 100, I do get a modest improvement
with this (mean of medians of three runs is better by 2%)

Sample readings, before this change:

! wall 0.175609 comb 0.180000 user 0.180000 sys 0.000000 (median of 58)

With this change:

! wall 0.171662 comb 0.180000 user 0.170000 sys 0.010000 (median of 60)

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gracinet created this revision.Feb 12 2019, 7:02 AM
kevincox accepted this revision.Feb 12 2019, 9:42 AM
This revision was automatically updated to reflect the committed changes.