Hi guys! I've noticed that in latest Compose alpha compositeHashKey length was increased from 32 bits to 64 (on JVM). It was done to reduce chance of hash collisions. I'm just curious, what happens with Compose runtime if hash collision happens? I've never noticed any weird behavior causes by this, and hash length increase probably causes some runtime overhead, so there must be a reason to do this change which I'm curious to know :)
s
shikasd
04/24/2025, 8:41 AM
I don't think there's any runtime overhead, 64 bit CPUs are very good at handling 64 bit numbers
shikasd
04/24/2025, 8:58 AM
I think the chance of collision was decently high, but we didn't get any report of rememberSaveable missing data (which would happen in this case)
g
Grigory Panko
04/24/2025, 10:55 AM
I see, it's indeed something not really noticeable, but good to hear that this bug will have much less chance now. Thank you!