2 ms·
> How is Go randomizing the map iteration order? Go does seed hashes on a per-hashmap basis, as does rust. But that still gives you consistent iteration order
by masklinn 2y ago
> How is Go randomizing the map iteration order?
Go does seed hashes on a per-hashmap basis, as does rust. But that still gives you consistent iteration order for a given map: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=74d028a21efe761cf46f9b567f7cbe02 https://play.rust-lang.org/?version=stable&mode=debug&editio...
Go also randomly offsets the start point of every map iteration: https://go.dev/play/p/SlfDjGKi77L https://go.dev/play/p/SlfDjGKi77L