4 ms·
it is random, isn't it? https://code.google.com/p/go/source/detail?r=02c15930f43c https://code.google.com/p/go/source/detail?r=02c15930f43c
by dickeytk 12y ago
it is random, isn't it? https://code.google.com/p/go/source/detail?r=02c15930f43c https://code.google.com/p/go/source/detail?r=02c15930f43c
- teraflop 12y agoWell, sort of. The hash table stores elements in a semi-deterministic order, dependent only on the keys and a per-map hash seed. Every time you iterate over it, you start at a randomly-chosen point in the table and iterate sequentially. So although you can't rely on seeing elements in the same order on any particular iteration, the order itself is far from uniformly random.
- deleted 12y ago[deleted]