« * K @shikasd.bsky.social

Andrei Shikov @shikasd.bsky.social

2026-08-23 13:33 UTC

if you are using Compose sizes or offsets as hashmap keys, consider a custom wrapper that does normal 31 * x + y kinda thing The hash for these is borked and is basically x ^ y, which is the same for a variety of pairs

Quoting @shikasd.bsky.social: turns out, sometimes it is a bad idea to pack ints into longs because jvm implemented Long hash as `v ^ (v >> 32)`

6 likes, 0 reposts, 2 replies

3 Next post4 More from @shikasd.bsky.socialBackBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup