bors 2e486be8d2 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.
2023-04-05 18:35:34 +00:00
..
2023-03-20 10:25:29 +00:00
2023-01-17 16:23:22 +01:00
2023-04-03 10:23:08 +02:00
2023-01-11 20:42:13 -05:00
2023-01-17 16:23:22 +01:00
2023-01-17 16:23:22 +01:00
2023-03-16 15:07:04 +01:00
2023-01-17 16:23:22 +01:00
2023-01-17 16:23:22 +01:00
2023-01-17 16:23:22 +01:00
2023-01-17 16:23:22 +01:00
2023-02-14 19:21:58 -05:00
2023-01-17 16:23:22 +01:00
2023-01-17 16:23:22 +01:00
2023-01-17 16:23:22 +01:00
2023-01-17 16:23:22 +01:00
2023-01-17 16:23:22 +01:00
2023-02-14 19:21:58 -05:00
2023-01-17 16:23:22 +01:00
2023-01-17 16:23:22 +01:00

The files here use the LLVM FileCheck framework, documented at https://llvm.org/docs/CommandGuide/FileCheck.html.

One extension worth noting is the use of revisions as custom prefixes for FileCheck. If your codegen test has different behavior based on the chosen target or different compiler flags that you want to exercise, you can use a revisions annotation, like so:

// revisions: aaa bbb
// [bbb] compile-flags: --flags-for-bbb

After specifying those variations, you can write different expected, or explicitly unexpected output by using <prefix>-SAME: and <prefix>-NOT:, like so:

// CHECK: expected code
// aaa-SAME: emitted-only-for-aaa
// aaa-NOT:                        emitted-only-for-bbb
// bbb-NOT:  emitted-only-for-aaa
// bbb-SAME:                       emitted-only-for-bbb