bors daf2204aa4 Auto merge of #91837 - Kobzol:stable-hash-map-avoid-sort, r=the8472
Avoid sorting in hash map stable hashing

Suggested by `@the8472` [here](https://github.com/rust-lang/rust/pull/89404#issuecomment-991813333). I hope that I understood it right, I replaced the sort with modular multiplication, which should be commutative.

Can I ask for a perf. run? However, locally it didn't help at all. Creating the `StableHasher` all over again is probably slowing it down quite a lot. And using `FxHasher` is not straightforward, because the keys and values only implement `HashStable` (and probably they shouldn't be just hashed via `Hash` anyway for it to actually be stable).

Maybe the `StableHash` interface could be changed somehow to better suppor these scenarios where the hasher is short-lived. Or the `StableHasher` implementation could have variants with e.g. a shorter buffer for these scenarios.
2021-12-18 21:23:37 +00:00
..
2021-10-10 16:32:16 +02:00
2021-08-24 02:28:38 +02:00
2021-12-12 12:35:01 +08:00
2021-10-10 15:38:19 +02:00
2021-12-09 00:01:29 +01:00
2021-08-15 18:44:06 +02:00
2021-12-07 11:11:23 +00:00
2021-12-09 00:01:29 +01:00
2021-12-09 00:01:29 +01:00
2021-10-21 23:08:57 +02:00
2021-12-13 21:34:54 +01:00
2021-10-10 15:38:19 +02:00
2021-11-07 16:59:05 +01:00
2021-08-22 15:35:11 +02:00
2021-09-05 06:10:21 +02:00
2021-10-10 15:38:19 +02:00