Skip to content

Commit

Permalink
Fix major performance regression by downgrading to rustc-hash 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nhusung committed Oct 15, 2024
1 parent abc1fa6 commit 093fcff
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 21 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion crates/oxidd-cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
7 changes: 6 additions & 1 deletion crates/oxidd-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
5 changes: 4 additions & 1 deletion crates/oxidd-dump/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 5 additions & 1 deletion crates/oxidd-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 4 additions & 1 deletion crates/oxidd-manager-index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion crates/oxidd-manager-pointer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 5 additions & 2 deletions crates/oxidd-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion crates/oxidd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 093fcff

Please sign in to comment.