4 ms·
If your language supports generators, this works a lot better than making copies of the entire dataset too.
by rcleveng 1y ago
If your language supports generators, this works a lot better than making copies of the entire dataset too.
- KlayLay 1y agoYou don't need your programming language to implement generators for you. You can implement them yourself.
- akshayshah 1y agoSometimes, sure - but sometimes, passing around a fat wrapper around a DB cursor is worse, and the code would be better off paginating and materializing each page of data in memory. As usual, it depends.