Menu

#77 Refactor iterators

Version 2.0
open
None
3
2013-10-24
2013-10-24
No

Currently, iterators over collections and maps will make a snapshot of the underlying collection/map at the point of creation. This guarantees the iteration semantics, but incurs a significant penalty if the collection/map iterated over is not modified while iterating.

Instead, consider re-implementing the iterators in such a way that they don't create a snapshot outright, but iterate over the collection/map itself, and either fail-fast or (and this is preferred) make a lazy copy if the collection/map is modified while iterating over it

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.