Stream: cranelift

Topic: isle stablemap and disjoint set


view this post on Zulip Kirp (Apr 24 2024 at 13:29):

I was looking at the isle code and had some q’s: is stable map the same as a normal hash map without the non deterministic iterative methods, and for DisjointSets, in the merge fn, why is the assert_neq! necessary for x and y as opposed to an early return?

view this post on Zulip Chris Fallin (Apr 24 2024 at 15:06):

First Q: yes, stablemap is a way to ensure deterministic output (of the isle compiler) with some type safety

view this post on Zulip Chris Fallin (Apr 24 2024 at 15:09):

second Q: it seems like just an API design question; here the data structure requires that a merge is a real merge, it could have been designed to short-circuit this case

view this post on Zulip Chris Fallin (Apr 24 2024 at 15:09):

there's some subtlety around "every set has at least two members" that I don't quite fully understand either; @Jamey Sharp may be able to say more


Last updated: Dec 23 2024 at 12:05 UTC