about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/spans.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-17 15:10:04 +0000
committerbors <bors@rust-lang.org>2022-06-17 15:10:04 +0000
commit43c47db0b04627dbd0e16a1e7cad14a4a5a60d3a (patch)
tree39e03aaf205309abd4b2a5f70f3ad0276af594b1 /compiler/rustc_mir_transform/src/coverage/spans.rs
parent949a64ab20b9d5d4516416c4735b134e0496855a (diff)
parent61dc08037551330f3cdb9ca97736d661c9e939dc (diff)
downloadrust-43c47db0b04627dbd0e16a1e7cad14a4a5a60d3a.tar.gz
rust-43c47db0b04627dbd0e16a1e7cad14a4a5a60d3a.zip
Auto merge of #98097 - lqd:const-alloc-hash, r=oli-obk
ctfe: limit hashing of big const allocations when interning

Const allocations are only hashed for interning. However, they can be large, making the hashing expensive especially since it uses `FxHash`: it's better suited to short keys, not potentially big buffers like the actual bytes of allocation and the associated 1/8th sized `InitMask`.

We can partially hash these fields when they're large, hashing the length, and head and tail of these buffers, to
limit possible collisions while avoiding most of the hashing work.

r? `@ghost`
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/spans.rs')
0 files changed, 0 insertions, 0 deletions