4 ms·
I always thought the reason iterators are used in preference to lists was due to the memory advantages, not the performance.
by mctx 13y ago
I always thought the reason iterators are used in preference to lists was due to the memory advantages, not the performance.
- ekimekim 13y agoThere's also flexibility improvements to do with lazy evaluation, and it makes the Twisted guys not hate you.
- merlincorey 13y agoThe memory advantages are key to performance when you have a non-trivially sized dataset, in my experience.