Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Once source comes from the memory allocator, and the pointers it gives out.

If you have an ordered map of pointers (e.g. std::map<void*>), iterating over the map will not be deterministic because the pointers given by a (regular) allocator are not deterministic.



This may be true in c++ but I believe is not in JavaScript. The language defines iteration order over keys of an object to be the insertion order (except numeric keys which are in ascending order). Not sure if there's anywhere that iteration order is actually nondeterministic that's allowed by the spec.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: