-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Right this second I don't have a great MVE code for you, although I can link to the github repo: https://github.com/rodya-mirov/twisty/blob/main/src/main.rs
Run cargo run --release -- skewb
; with the ahash version pinned at 0.8.6, the script finishes in about 3.5s. With the bump to 0.8.7, the script finishes in about 5s. This is, obviously, not great.
Under the hood this is basically a stress test for the ahash hashset; the hashed objects are somewhat deeply nested, but everything is Copy (no pointers or anything) and the objects should be 20 bytes, assuming rustc did what I expected it to do. It's generating millions of them, inserting them, and branching on whether or not the inserted object was new.
The correctness is unaffected; that is, I'm getting the same answers before and after; but obviously performance is way down. Since the numbers are unchanging and the other code is the same, I have to assume the issue lies with the ahash changes.
My local environment:
I'm using rust 1.75.0 (stable).
Chip: Apple M1 Pro
OS: macOS Ventura 13.6.2
I can try and trim it down to an MVE if this isn't a known issue and that would be helpful (although the linked code is probably less than 400 lines all told, if you restrict just to the skewb.rs and cubesearch.rs; everything else is dead in this invocation).