News for hackers. Stuff that matters.
Re:Hyrum's Law by kevin_thibedeau on Sunday January 09, 2022 @05:18AM (#29862027)
They randomize the hashing to protect against DoS attacks. You have to go to lengths to preserve the order.
Re:Hyrum's Law by wruza on Monday January 10, 2022 @11:19AM (#29877113)
It depends. Bare hash tables are semi-random and get reshuffled at growth points naturally. But I remember reading in some manual that that language reshuffles iteration even for immutable hash tables. Js objects are usually based on "shapes", which do not follow hash table semantics:

https://mathiasbynens.be/notes/shapes-ics

https://v8.dev/blog/fast-properties