diff options
| author | bors <bors@rust-lang.org> | 2023-04-05 18:35:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-05 18:35:34 +0000 |
| commit | 2e486be8d29d198d48bc26bfce5712a4822814f5 (patch) | |
| tree | b7ae3dd753c0638c2481f4e3822a9889b7030a09 /tests/codegen | |
| parent | b2b676d886ded452125712a304c524c08360f916 (diff) | |
| parent | 46a3d28e8840f8f7e400e661fc6c544697ad50a7 (diff) | |
| download | rust-2e486be8d29d198d48bc26bfce5712a4822814f5.tar.gz rust-2e486be8d29d198d48bc26bfce5712a4822814f5.zip | |
Auto merge of #107925 - thomcc:sip13, r=cjgillot
Use SipHash-1-3 instead of SipHash-2-4 for StableHasher Noticed this, and it seems easy and likely a perf win. IIUC we don't need DDOS resistance (just collision) so we ideally would have an even faster hash, but it's hard to beat this SipHash impl here, since it's been so highly tuned for the interface. It wouldn't surprise me if there's some subtle reason changing this sucks, as it's so obvious it seems likely to have been done. Still, SipHash-1-3 seems to still have the guarantees StableHasher should need (and seemingly more), and is clearly less work. So it's worth a shot. Not fully tested locally.
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/consts.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/remap_path_prefix/main.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/virtual-function-elimination.rs | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/codegen/consts.rs b/tests/codegen/consts.rs index 8a135039c06..fc2badc417c 100644 --- a/tests/codegen/consts.rs +++ b/tests/codegen/consts.rs @@ -9,7 +9,7 @@ // CHECK: @STATIC = {{.*}}, align 4 // This checks the constants from inline_enum_const -// CHECK: @alloc_701ed935fbda2002838d0a2cbbc171e5 = {{.*}}, align 2 +// CHECK: @alloc_af1f8e8e6f4b341431a1d405e652df2d = {{.*}}, align 2 // This checks the constants from {low,high}_align_const, they share the same // constant, but the alignment differs, so the higher one should be used diff --git a/tests/codegen/remap_path_prefix/main.rs b/tests/codegen/remap_path_prefix/main.rs index 85523d053b5..f1e1dd69b96 100644 --- a/tests/codegen/remap_path_prefix/main.rs +++ b/tests/codegen/remap_path_prefix/main.rs @@ -12,7 +12,7 @@ mod aux_mod; include!("aux_mod.rs"); // Here we check that the expansion of the file!() macro is mapped. -// CHECK: @alloc_af9d0c7bc6ca3c31bb051d2862714536 = private unnamed_addr constant <{ [34 x i8] }> <{ [34 x i8] c"/the/src/remap_path_prefix/main.rs" }> +// CHECK: @alloc_5761061597a97f66e13ef2ff92712c4b = private unnamed_addr constant <{ [34 x i8] }> <{ [34 x i8] c"/the/src/remap_path_prefix/main.rs" }> pub static FILE_PATH: &'static str = file!(); fn main() { diff --git a/tests/codegen/virtual-function-elimination.rs b/tests/codegen/virtual-function-elimination.rs index 30e5cd0584d..f22176a024f 100644 --- a/tests/codegen/virtual-function-elimination.rs +++ b/tests/codegen/virtual-function-elimination.rs @@ -82,7 +82,7 @@ fn taking_u(u: &dyn U) -> i32 { } pub fn taking_v(v: &dyn V) -> i32 { - // CHECK: @llvm.type.checked.load({{.*}}, i32 24, metadata !"NtCsfRpWlKdQPZn_28virtual_function_elimination1V") + // CHECK: @llvm.type.checked.load({{.*}}, i32 24, metadata !"NtCs64ITQYi9761_28virtual_function_elimination1V") v.public_function() } @@ -97,5 +97,5 @@ pub fn main() { // CHECK: ![[TYPE0]] = !{i64 0, !"[[MANGLED_TYPE0]]"} // CHECK: ![[VCALL_VIS0]] = !{i64 2} // CHECK: ![[TYPE1]] = !{i64 0, !"[[MANGLED_TYPE1]]"} -// CHECK: ![[TYPE2]] = !{i64 0, !"NtCsfRpWlKdQPZn_28virtual_function_elimination1V"} +// CHECK: ![[TYPE2]] = !{i64 0, !"NtCs64ITQYi9761_28virtual_function_elimination1V"} // CHECK: ![[VCALL_VIS2]] = !{i64 1} |
