Comment by wrsh07
1 year ago
At Google (long time off and on home of Hyrum), they migrated to swisstable from other hash maps. Unordered map iterates through the elements in insertion order. They explicitly couldn't support that without adding overhead to their new table so they randomized iteration order of the map
The migrations to the new table were fun because you would migrate some code and then find a test that assumed the order things were inserted into some seemingly distant protocol buffer array were in insertion order of the map
Usually the ordering was just a defect of the test, but it required actually digging in to be sure
IIRC There's a (CppCon?) talk about this rollout where Hyrum is in the audience so that he can heckle each time they describe a change which "obviously" can't break anybody because of course Hyrum's Law did cause that to break at Google when they did it.
Maybe somebody who remembers better can link it and/or correct my memory of exactly what's going on.
I believe it's this talk on swisstables from cppcon 2019:
https://youtu.be/JZE3_0qvrMg?t=1426