On Feb 14, 2012, at 3:45 AM, Andreas Rossberg wrote: > On 14 February 2012 12:02, David Bruant <bruan...@gmail.com> wrote: >> Le 14/02/2012 11:23, Andreas Rossberg a écrit : > >>> And I see potential reasons why order might differ for separate >>> iterations over the same collection. >> >> I'm interested in hearing more :-) > > Dynamic changes of representation, for example. V8 does things like > that all the time. And it currently goes to some length to make for-in > deterministic. >
Good hash table designs typically rehash (reorganize) themselves when they reach a certain percentage of their total capacity or are experiencing too many hash collisions. One of the simplest iteration strategies for a hash table is often physical placement order. Rehashing will typically change the physical placement of entries and hence that ordering. Allen
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss