Sciweavers

ICFP
2006
ACM

A technique for generic iteration and its optimization

14 years 11 months ago
A technique for generic iteration and its optimization
Software libraries rely increasingly on iterators to provide generic traversal of data structures. These iterators can be represented either as objects that maintain state or as programs that suspend and resume control. This paper addresses two problems that remain in the use of iterators today: The first problem is that iterators represented as state-saving objects in languages such as C++ or Java typically have logic that is much more complicated than control?based iterators. This paper presents a program structuring technique that allows object?based iterators to be implemented with the same clarity as control?based iterators. The second problem is that the usual implementations of control?based iterators are not sufficiently efficient for high-performance applications. This paper presents a code optimization technique that can be applied to control?based iteration to produce efficient natural loops at the machine code level. Combined, these two results allow iterators for complex ...
Stephen M. Watt
Added 13 Dec 2009
Updated 13 Dec 2009
Type Conference
Year 2006
Where ICFP
Authors Stephen M. Watt
Comments (0)