about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2022-06-14 16:03:26 +0200
committerRémy Rakic <remy.rakic+github@gmail.com>2022-06-16 19:36:51 +0200
commitb1f31f853ed93b651ddd0a1c32d6264085f57ce6 (patch)
treec00b1bc676c8d420c40ef45241fc6a8e1f7bff78 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentd35d972e6974d40d30362344ea619a5b560aae20 (diff)
downloadrust-b1f31f853ed93b651ddd0a1c32d6264085f57ce6.tar.gz
rust-b1f31f853ed93b651ddd0a1c32d6264085f57ce6.zip
ctfe: limit hashing of big const allocations when interning
Big const allocations hash a large amount of data for interning:
the whole bytes buffer, and the 1/8th sized initmask, with FxHash.
This hash function is made for shorter keys.

This only hashes the length, and head and tail of these buffers, to
limit possible collisions while avoiding most of the hashing work.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions