From 093fcfff08bf4b0c5979fa920f64580d2e84ed06 Mon Sep 17 00:00:00 2001 From: Nils Husung Date: Tue, 15 Oct 2024 13:52:36 +0200 Subject: [PATCH] Fix major performance regression by downgrading to rustc-hash 1.1 See https://github.com/rust-lang/rustc-hash/issues/45 --- Cargo.lock | 24 ++++++++++++------------ crates/oxidd-cache/Cargo.toml | 5 ++++- crates/oxidd-cli/Cargo.toml | 7 ++++++- crates/oxidd-dump/Cargo.toml | 5 ++++- crates/oxidd-ffi/Cargo.toml | 6 +++++- crates/oxidd-manager-index/Cargo.toml | 5 ++++- crates/oxidd-manager-pointer/Cargo.toml | 5 ++++- crates/oxidd-parser/Cargo.toml | 7 +++++-- crates/oxidd/Cargo.toml | 6 +++++- 9 files changed, 49 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba1a322..a069bd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -493,7 +493,7 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oxidd" -version = "0.8.0" +version = "0.8.1" dependencies = [ "cfg-if", "document-features", @@ -513,7 +513,7 @@ dependencies = [ [[package]] name = "oxidd-cache" -version = "0.8.0" +version = "0.8.1" dependencies = [ "allocator-api2", "document-features", @@ -527,7 +527,7 @@ dependencies = [ [[package]] name = "oxidd-cli" -version = "0.2.3" +version = "0.2.4" dependencies = [ "bitvec", "clap", @@ -567,7 +567,7 @@ dependencies = [ [[package]] name = "oxidd-dump" -version = "0.3.0" +version = "0.3.1" dependencies = [ "bitvec", "document-features", @@ -579,7 +579,7 @@ dependencies = [ [[package]] name = "oxidd-ffi" -version = "0.8.0" +version = "0.8.1" dependencies = [ "oxidd", "oxidd-core", @@ -589,7 +589,7 @@ dependencies = [ [[package]] name = "oxidd-manager-index" -version = "0.8.0" +version = "0.8.1" dependencies = [ "bitvec", "crossbeam-utils", @@ -602,7 +602,7 @@ dependencies = [ [[package]] name = "oxidd-manager-pointer" -version = "0.3.0" +version = "0.3.1" dependencies = [ "arcslab", "bitvec", @@ -616,7 +616,7 @@ dependencies = [ [[package]] name = "oxidd-parser" -version = "0.3.1" +version = "0.3.2" dependencies = [ "bitvec", "codespan-reporting", @@ -790,9 +790,9 @@ dependencies = [ [[package]] name = "rustc-hash" -version = "2.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" @@ -974,9 +974,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.99" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "207aa50d36c4be8d8c6ea829478be44a372c6a77669937bb39c698e52f1491e8" +checksum = "8923cde76a6329058a86f04d033f0945a2c6df8b94093512e4ab188b3e3a8950" dependencies = [ "glob", "serde", diff --git a/crates/oxidd-cache/Cargo.toml b/crates/oxidd-cache/Cargo.toml index 9d61cea..790d785 100644 --- a/crates/oxidd-cache/Cargo.toml +++ b/crates/oxidd-cache/Cargo.toml @@ -29,7 +29,10 @@ oxidd-derive.workspace = true oxidd-test-utils.workspace = true # fast hash function -rustc-hash = "2" +# +# Note that there is a performance regression with 2.0, see +# https://github.com/rust-lang/rustc-hash/issues/45 +rustc-hash = "1.1" [features] diff --git a/crates/oxidd-cli/Cargo.toml b/crates/oxidd-cli/Cargo.toml index bb2003c..ca02482 100644 --- a/crates/oxidd-cli/Cargo.toml +++ b/crates/oxidd-cli/Cargo.toml @@ -26,8 +26,13 @@ clap = { version = "4", features = ["derive", "wrap_help"] } # big integers num-bigint = "0.4" +# fast hash function +# +# Note that there is a performance regression with 2.0, see +# https://github.com/rust-lang/rustc-hash/issues/45 +rustc-hash = "1.1" + parking_lot = "0.12" # fast alternative Mutex & RwLock implementation -rustc-hash = "2" # fast hash function rayon = "1.10" # thread pools, parallel iterators etc. bitvec = "1" diff --git a/crates/oxidd-dump/Cargo.toml b/crates/oxidd-dump/Cargo.toml index 6b18c0e..6d28a08 100644 --- a/crates/oxidd-dump/Cargo.toml +++ b/crates/oxidd-dump/Cargo.toml @@ -20,7 +20,10 @@ oxidd-core.workspace = true bitvec = { version = "1", optional = true } # fast hash function -rustc-hash = { version = "2", optional = true } +# +# Note that there is a performance regression with 2.0, see +# https://github.com/rust-lang/rustc-hash/issues/45 +rustc-hash = { version = "1.1", optional = true } # optimized searching for characters in &[u8] memchr = { version = "2", optional = true } diff --git a/crates/oxidd-ffi/Cargo.toml b/crates/oxidd-ffi/Cargo.toml index 4b4af1d..2c8596f 100644 --- a/crates/oxidd-ffi/Cargo.toml +++ b/crates/oxidd-ffi/Cargo.toml @@ -22,7 +22,11 @@ oxidd-core = { workspace = true } oxidd-dump = { workspace = true, features = ["dddmp", "dot"] } oxidd = { workspace = true, features = ["bdd", "bcdd", "zbdd"] } -rustc-hash = "2" # fast hash function +# fast hash function +# +# Note that there is a performance regression with 2.0, see +# https://github.com/rust-lang/rustc-hash/issues/45 +rustc-hash = "1.1" [features] diff --git a/crates/oxidd-manager-index/Cargo.toml b/crates/oxidd-manager-index/Cargo.toml index c69bf8a..e560a51 100644 --- a/crates/oxidd-manager-index/Cargo.toml +++ b/crates/oxidd-manager-index/Cargo.toml @@ -21,7 +21,10 @@ parking_lot = "0.12" linear-hashtbl.workspace = true # fast hash function -rustc-hash = "2" +# +# Note that there is a performance regression with 2.0, see +# https://github.com/rust-lang/rustc-hash/issues/45 +rustc-hash = "1.1" # bit vectors bitvec = "1" diff --git a/crates/oxidd-manager-pointer/Cargo.toml b/crates/oxidd-manager-pointer/Cargo.toml index f6b4908..74b74dc 100644 --- a/crates/oxidd-manager-pointer/Cargo.toml +++ b/crates/oxidd-manager-pointer/Cargo.toml @@ -27,7 +27,10 @@ parking_lot = "0.12" linear-hashtbl.workspace = true # fast hash function -rustc-hash = "2" +# +# Note that there is a performance regression with 2.0, see +# https://github.com/rust-lang/rustc-hash/issues/45 +rustc-hash = "1.1" # bit vectors bitvec = "1" diff --git a/crates/oxidd-parser/Cargo.toml b/crates/oxidd-parser/Cargo.toml index 9a6710a..05a6371 100644 --- a/crates/oxidd-parser/Cargo.toml +++ b/crates/oxidd-parser/Cargo.toml @@ -27,8 +27,11 @@ codespan-reporting = { version = "0.11", optional = true } # bit vectors bitvec = "1" -# hash function -rustc-hash = "2" +# fast hash function +# +# Note that there is a performance regression with 2.0, see +# https://github.com/rust-lang/rustc-hash/issues/45 +rustc-hash = "1.1" # `Builder` derive macro derive_builder = "0.20" diff --git a/crates/oxidd/Cargo.toml b/crates/oxidd/Cargo.toml index 800bc86..49db475 100644 --- a/crates/oxidd/Cargo.toml +++ b/crates/oxidd/Cargo.toml @@ -26,7 +26,11 @@ oxidd-rules-mtbdd = { workspace = true, optional = true } oxidd-rules-tdd = { workspace = true, optional = true } oxidd-rules-zbdd = { workspace = true, optional = true } -rustc-hash = "2" # fast hash function +# fast hash function +# +# Note that there is a performance regression with 2.0, see +# https://github.com/rust-lang/rustc-hash/issues/45 +rustc-hash = "1.1" cfg-if = "1.0"