This is an archive of the discontinued Mercurial Phabricator instance.

mdiff: use slice instead of index on bytestr when checking single bytes
ClosedPublic

Authored by durin42 on Feb 1 2018, 6:26 PM.

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

durin42 created this revision.Feb 1 2018, 6:26 PM
indygreg accepted this revision.Feb 1 2018, 6:31 PM
indygreg added a subscriber: indygreg.

I'd be curious if there is a perf hit to this. The slicing API is a bit more involved than __getitem__ at the C layer. But since this is Python code, my guess is run time is dominated by Python function call overhead and we don't notice a perf difference.

This revision is now accepted and ready to land.Feb 1 2018, 6:31 PM
This revision was automatically updated to reflect the committed changes.