Skip to content

Forward Hash::write_iN to Hash::write_uN#73800

Merged
bors merged 1 commit intorust-lang:masterfrom
nikic:hash_i
Jun 28, 2020
Merged

Forward Hash::write_iN to Hash::write_uN#73800
bors merged 1 commit intorust-lang:masterfrom
nikic:hash_i

Conversation

@nikic
Copy link
Contributor

@nikic nikic commented Jun 27, 2020

The Hasher::write_iN() methods should forward to Hasher::write_uN(), because some Hasher implementations implement only the write_uN() variants, with the expectation that write_iN() will use the same implementation. Most notably, this is the case for the FxHasher used by rustc itself.

This used to be the case previously, but was broken in #59982. As the PR description makes no mention of this particular change, I assume it was unintentional.

In a local test, this mitigates the regression from #73526 on at least one test-case (cc @cuviper), because we're no longer at the mercy of FxHasher::write() getting inlined to get reasonable performance.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants