This is an archive of the discontinued Mercurial Phabricator instance.

hbisect: use a defaultdict to avoid large allocations for a large changelogs
ClosedPublic

Authored by dsp on Nov 23 2017, 5:24 PM.

Details

Summary

We can avoid a SPACE(len(changelog)) allocation by using a defaultdict.

Test Plan
python run-tests.py test-bisect*

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

dsp created this revision.Nov 23 2017, 5:24 PM
yuja accepted this revision.Nov 24 2017, 10:38 PM
This revision is now accepted and ready to land.Nov 24 2017, 10:38 PM
yuja added a comment.Nov 24 2017, 10:42 PM

Queued, thanks. I don't have any number, but this seems good for a common
scenario in which a small part of a large repository will be bisected.

This revision was automatically updated to reflect the committed changes.