feat(tvix/eval): Forbid Hash{Map,Set}, use Fx instead

Per https://nnethercote.github.io/perf-book/hashing.html, we have
basically no reason to use the default hasher over a faster,
non-DoS-resistant hasher. This gives a nice perf boost basically for
free:

hello outpath           time:   [704.76 ms 714.91 ms 725.63 ms]
                        change: [-7.2391% -6.1018% -4.9189%] (p = 0.00 < 0.05)
                        Performance has improved.

Change-Id: If5587f444ed3af69f8af4eead6af3ea303b4ae68
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12046
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: aspen <root@gws.fyi>
This commit is contained in:
Aspen Smith 2024-07-28 12:11:41 -04:00 committed by clbot
parent 1d7ba89c19
commit b8f92a6d53
17 changed files with 116 additions and 46 deletions

14
tvix/Cargo.lock generated
View file

@ -3085,7 +3085,7 @@ dependencies = [
"pin-project-lite",
"quinn-proto",
"quinn-udp",
"rustc-hash",
"rustc-hash 1.1.0",
"rustls 0.23.7",
"thiserror",
"tokio",
@ -3101,7 +3101,7 @@ dependencies = [
"bytes",
"rand",
"ring",
"rustc-hash",
"rustc-hash 1.1.0",
"rustls 0.23.7",
"slab",
"thiserror",
@ -3416,7 +3416,7 @@ dependencies = [
"countme",
"hashbrown 0.14.3",
"memoffset 0.9.0",
"rustc-hash",
"rustc-hash 1.1.0",
"text-size",
]
@ -3473,6 +3473,12 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustc-hash"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
[[package]]
name = "rustc_version"
version = "0.4.0"
@ -4864,6 +4870,7 @@ dependencies = [
"nix-compat",
"rnix",
"rowan",
"rustc-hash 2.0.0",
"rustyline",
"smol_str",
"thiserror",
@ -4905,6 +4912,7 @@ dependencies = [
"rnix",
"rowan",
"rstest",
"rustc-hash 2.0.0",
"serde",
"serde_json",
"sha1",